Expand description
elly β run an Elly module as a program.
A program is a module: the same parser, the same const stage, the same
instantiation, plus one reserved moditem saying the file may be run. A
library is the same file without it. See docs/done/2026-08-14_elly-run.md.
The runner itself lives in elly-host: the resolver, the IO capability
and running __main against it. What is left here is the command line and
turning how the run ended into an exit status.
EnumsΒ§
- Args π
- What the command line asked for.
ConstantsΒ§
- FAILED π
- The program started and failed: an uncaught raise.
- NOT_
STARTED π - The program never started: bad usage, an unreadable file, a load or compile failure. The two failure statuses differ because they fail at different stages.
- OK π
- The program ran and asked for nothing else.
- USAGE π
FunctionsΒ§
- describe_
load π - Why a module graph would not load, in one line.
- fail π
- Report
messageon stderr under the programβs own name, and hand backstatusformainto exit with. - finished π
- The program returned normally. Its value is ignored β printing a result is
REPL behaviour, and
[]as unit is not distinctive enough to key on β so the status is 0 unlessIO.Proc.exitalready said otherwise. - main π
- parse_
args π - Read the command line. Two invocations, because
#!/usr/bin/env ellyexecselly <script> <argsβ¦>: the bare form has to work, withelly run <script>as its explicit spelling. - read_
script π - Canonicalize and read the entry script, or say why not.
- run π
- Load
script, run its__mainagainst a freshIO, and report what happened.