ll-lang User Guide¶
A practical guide for programmers (human or LLM) who want to write .lll
programs, compile them with lllc, and target F#, TypeScript, Python, Java,
C#, with optional experimental LLVM IR output.
ll-lang is a statically typed functional language with Hindley-Milner inference, algebraic data types, traits, semantic tags, and unit algebra.
Contents¶
- Installation — build the compiler, run hello world
- Syntax — modules, bindings, lambdas,
if,match, ADTs, traits - Types and inference — H-M, polymorphism, annotations
- Tags and units — tags, phantom types, unit algebra
- Traits — declarations, impls, constrained generics, dispatch
- Modules — module headers, imports, project mode (
lll.toml) - Error codes — compact diagnostics (
E001..E008,E020,E024..E031) - CLI — build/check/run/new/install/self commands (+ experimental reverse)
- MCP server —
lllc mcptools for LLM clients - Compilation targets —
--target fs|ts|py|java|cs|llvm - Java target details — Java backend mapping details
- LLM prompting — short guide for ll-lang prompting
Status¶
Compiler phases 1 to 10 are complete. Current stable surface includes:
- End-to-end pipeline (
lexer -> parser -> elaborator -> HM infer -> codegen) - Multi-file projects with
lll.tomland target selection - Self-hosted stdlib/compiler bootstrap flow
- Canonical default operator fixities from
Std.Operators - MCP server for structured LLM tooling
- Targets: F#, TypeScript, Python, Java, C#
Current caveats:
- LLVM backend is intentionally subset-based compared to the primary F# backend.
lllc reverseis available as experimental tooling and is outside 1.0 compatibility guarantees.- See Release Contract 1.0.