Definitions
L definitions introduce words, grammatical forms, typed arguments and ordered actions. Descriptors supply construction rules. Both participate in ordinary compilation rather than unrestricted native text substitution.
Compose a source action
Section titled “Compose a source action”Use IO's Print from `io` as "Print"."message" is `done`.
Create "Launch|-es|-ed|-ing" for Building any App and Running it and then Awaiting it."Compact" describes a Generic App with a New Main Service using any Process."message" is `First local`.Create "First" as a New Compact App.The App Prints message.Launch First.Define "result" as First's Output.Show result.
Create "Launch|-es|-ed|-ing" for Building any App and Running it and then Awaiting it."Compact" describes a Generic App with a New Main Service using any Process."message" is `Second local`.Create "Second" as a New Compact App.The App Prints message.Launch Second.Define "result" as Second's Output.Show result.
Show message.Complete program. Source: demo/paragraphs/local-definitions.l.
Example evidence
Scoped action and descriptor definitions reuse source vocabulary. existing-witness-not-run. Evidence guide.
Create ... for ... defines Launch. any App declares its App argument; later uses of it refer to that same argument. Calling Launch First builds, runs and awaits First. Coordinated operands each receive the complete action body in source order.
"Launch|-es|-ed|-ing" declares Launch, Launches, Launched and Launching; see word forms. Each paragraph owns its Launch action and Compact descriptor, so sibling definitions remain independent.
Describe construction
Section titled “Describe construction”"Compact" describes a Generic App with a New Main Service using any Process defines Compact as an adjective descriptor for Apps. The Generic App is the App shape described by the rule; New Main Service supplies its entry structure, and using any Process passes the supplied body of actions into that structure. New Compact App applies that pattern to the new App, much like Basic.
Descriptor targets, names, typed arguments, source ownership and order remain significant: a rule for an App cannot be substituted for a Service rule. Generic here does not declare type parameters.
Know the implicit foundation
Section titled “Know the implicit foundation”The builtin reference lists the implicit foundation. Start and Execute compose App lifecycle actions.
Process, Function, Objective and Main compose the entry used by Basic. Typed Function declarations use the same builtin/logeme path and define ordinary invocation verbs. Function-local Return uses the selected builtin member; opaque native leaves retain their own type contracts.
Diagnose a definition failure
Section titled “Diagnose a definition failure”Check argument types and the source location in the diagnostic. Expansion cycles, malformed native framing and unsupported target compositions are distinct failures.
Continue with control flow, imports, and lifecycle before the advanced native-definition guide.
Canonical source: docs/guide/definitions.md.