v0.1 shipped. Here's what's next.
- Logos lexer, recursive descent parser, AST
- Tree-walking interpreter with 30+ builtins
- Hindley-Milner type inference (Algorithm W)
- Ownership & borrowing checker (lexical)
- Algebraic effects with one-shot continuations
- REPL with time travel and forking
- Basic WASM codegen (integers, functions, strings, println)
- CLI:
new,run,build,check,test,repl,explain - 45 tests passing
- Destructuring in
let:[let [x y] point],[let {name age} user] - Destructuring in
fnparams:[fn [[k v]] ...] - Exhaustiveness checking for
match(ADT constructors) - WASM indirect calls + environment passing for closures
- Lambda lifting for simple cases
-
[use module.path],[use module {item1 item2}](interpreter) - File = module convention (interpreter)
-
[pub defn ...]/[pub type ...]visibility (interpreter) - Multi-file execution (interpreter, with cycle detection + caching)
-
Result/Optionas proper ADTs (in prelude) - String:
join,trim,starts-with?,ends-with?,replace - Vec:
zip,flatten,chunk,reverse,drop,find - Map:
keys,values,merge,remove - Pipe operator type checking
-
word-count.ooworking - Clippy warnings clean
What's left to finish v0.2 properly.
-
[use ...]resolved during type checking (cross-file inference) -
[pub ...]visibility enforced in type checker - Multi-file compilation to WASM (module linking/bundling)
- Ref vs move capture analysis (integrate with ownership checker)
-
[trait Display [fn display [self] → String]] -
[impl Display Shape ...] - Trait-based operator overloading (
Add,Eq,Ord) - Trait bounds in type inference
- Typed AST (separate from untyped — type checker produces typed tree)
-
[sig]assertions checked against inferred types - Row polymorphism for maps/records
- Type error messages with source spans (integrate with codespan-reporting)
- Borrow inference per-parameter (read-only → immutable borrow, mutates → mutable borrow, escapes → move)
- Copy types: primitives auto-copy,
[derive Copy [type ...]] - Better error messages: what/why/how format with visual ownership diagrams
- Effect inference: calling
IO.read-filepropagatesIOto caller - Effect annotations checked:
/ {IO Fail}verified against inferred set -
?desugaring:[expr]?→ match on Result, perform Fail on Err - Partial handling: handle some effects, pass others through
-
IO: file read/write, stdin/stdout, env vars (via WASI) -
Fail: Result integration,?sugar -
Async: placeholder runtime handler, mock handler for testing - Channels:
[let [tx rx] [channel]],[send tx val],[recv rx]
-
Dimensionstruct with SI exponents (mass, length, time, current, temperature) -
Type::Dimvariant in type system — compile-time dimensional analysis, zero runtime overhead - Literal unit suffixes:
5.0m,9.81kg,10kNdesugar to[unit value :keyword] - 30+ units with SI prefixes (m, km, cm, mm, s, ms, kg, g, N, kN, Pa, MPa, GPa, J, W, kW, Hz, A, mA, V, C, ohm, K)
- 21 named quantities (Velocity, Force, Energy, Power, Pressure, Density, etc.)
- No-dimensionless rule:
Dim÷Dim → Scalar(not Float), explicitmagnitudeto exit -
Physicseffect (gravity, yield-strength, elastic-modulus, density, temperature, thermal-conductivity) -
Simeffect (stress, deflection, natural-freq, thermal-field) — bridge point for phyz - Dimensional polymorphism:
[fn double [x] [* 2.0 x]]works on any dimension - Physics-aware E0208 errors with named quantities and operation hints
- 5 physics constants:
Const.c,Const.G,Const.h,Const.k-B,Const.e-charge
- Closures (indirect calls + captured environments)
- ADTs (tagged unions on the heap)
- Pattern matching compilation (decision trees + br_table)
- Persistent data structures (vec-new, vec-push, vec-get)
- String operations beyond literals (str-len, str-concat, str-eq)
- WASI integration: file I/O, args, env
-
loon runexecutes WASM via wasmtime (instead of interpreting) -
loon build --releasewith tree-shaking - Target: hello world < 1KB, fib < 500 bytes
- Three-part errors: what / why / how to fix
- Visual ownership diagrams in error output
-
[explain EXXXX]interactive REPL tutorials (not just text) - Structured errors as data:
[catch-errors "[source]"]
- Go-to-definition
- Type-on-hover (the invisible type system, made visible)
- Autocomplete
- Inline diagnostics
- Inlay hints for inferred types (the three rendering modes from DESIGN.md)
-
loon fmt— deterministic structural formatting - No config, no debates — one true style
- Syntax highlighting for editors
-
[macro when [condition & body] ...] - Quasiquoting:
`,~,~@ - Hygiene by default (Scheme-style)
-
[macro+ ...]type-aware macros (run after type inference)
-
pkg.oomanifest format (Loon data format, not TOML) -
loon new,loon init— project scaffolding -
loon add,loon remove— dependency management - Path dependencies:
{:path "../my-lib"} - Version constraints:
^,~,>=,=,* - Capability grants:
:grant #["Net" "IO"] -
loon audit --capabilities— report effect grants -
loon why <source>— dependency trace -
loon search <query>— search package index -
loon cache clean— clear cache
- Domain detection:
github.com/user/reporecognized as remote - Git fetch:
git clone --depth 1to temp dir - URL fetch: HTTP GET + tar.gz extraction (ureq + flate2 + tar)
- Archive URL derivation for GitHub, GitLab, Codeberg
- BLAKE3 content-addressed hashing
- Cache at
~/.loon/cache/blake3/<hash>/ -
lock.oo— lockfile in Loon data format -
loon addauto-fetches and locks domain-qualified deps -
loon cache warm— fetch all unfetched deps - Feature-gated:
pkg-fetch(CLI only, not WASM) - Subpath support:
github.com/cam/std#http
- Transitive dependency resolution (parse fetched pkg.oo, resolve recursively)
- MVS (Minimum Version Selection) across the dep graph
-
loon update— re-resolve and update lock.oo - Package registry/index — built-in seed + fetchable remote indices
- Custom indices via
:indicesin pkg.oo -
loon searchsearches across builtin + custom indices -
loon whytraces transitive dependency chains
-
loon publish— create tarball + hash for publishing -
loon verify— verify cache integrity against lockfile hashes -
loon audit— full audit: capabilities, transitive grants, cache integrity, lockfile status - Hash verification on load (verify cache integrity in
resolve_remote_dep) - Capability propagation (transitive grant checking)
-
.ooas primary file extension (from l-oo-n),.loonas fallback -
pkg.oo/lock.oomanifest and lockfile (falls back to.loon) -
loon newcreates.oofiles - Module resolution tries
.oofirst, falls back to.loon
- IPFS distribution
- Every function/type identified by hash of its AST
-
[hash fn-name],[history fn-name] - Rename refactoring doesn't change identity
- Dead code detection via hash reachability
-
[memo defn ...]with automatic dependency tracking - Salsa-inspired query engine
- The compiler uses this internally
-
[ai defn ...]— compile-time code generation from prompts -
[semantic defn ...]— functions implemented by LLM calls -
[agent ...]— agent loops as a language primitive -
[#[tool] defn ...]— auto-generate tool schemas from types -
ai.extract— structured output via type → JSON schema - Model config in
loon.toml
- HAMT-based persistent vectors and maps
- Structural sharing, reference counting
-
[Store.open]— transparent persistence to disk
-
[#[track] ...]compile-time instrumentation -
[provenance val]— full origin chain - Zero cost for untracked paths
-
.oo.nb— interleaved markdown and code cells - Same type/ownership checking as regular files
- Compiles to WASM
- Native (non-WASM) compilation target
- Backward compat with any existing LISP
- GUI framework (provide FFI, frameworks are packages)
- Multi-shot continuations (one-shot only, like Koka)
Loon: a LISP that flies.