AILANG Implementation Status
Note: This page shows historical releases. For the absolute latest status:
- Current version: Check
git describe --tagsor GitHub releases- Test coverage: Run
make test-coverage-badgein the repo- Features: See CHANGELOG.md
Latest Stable Release
Check GitHub Releases for the current stable version.
Release History
v0.5.1 (December 2025)
API Discovery & DX Improvements:
- ✅
ailang builtins show <name>- Full documentation for any builtin with fuzzy search - ✅
--verboseFlag - Shows signatures and descriptions in builtins list - ✅ Public Import Path - Shows
import std/rand (rand_int)for internal builtins - ✅ Effect Module APIs - v0.5.1 prompt documents all effect module signatures
Go Codegen Improvements:
- ✅ RecordUpdate Support -
{ base | field: value }now generates valid Go code - ✅ Runtime Helper -
RecordUpdate()function added to generated preamble
v0.4.5 (November 2025)
Inline Testing System (M-TESTING-INLINE):
- ✅ Inline Test Syntax -
tests [(input, expected)]directly in function definitions - ✅
ailang testCommand - Run inline tests with fast execution (~10-60ms per file) - ✅ 98 Tests Migrated - 9 example files with comprehensive test coverage
- ✅ All Function Types - Recursive, non-recursive, multi-parameter, lists, pattern matching
- ✅ Main Coexistence - Tests work alongside
export func main()functions - ⚠️ Limitations - No cross-function dependencies yet (M-TESTING-DEPS milestone)
Implementation:
- ~1,400 LOC (executor, harness, runner, CLI integration)
- Full test coverage for all data types (int, float, bool, string, lists, tuples)
- Supports LetRec and Let bindings, UnaryOp, multi-arg functions
- Fast execution: 98 tests across 9 files in ~120ms total
Code Organization & AI Maintainability:
- ✅ Pipeline Refactoring - 2 large files → 10 focused modules (all <800 lines)
- ✅ AI-Friendly File Sizes -
pipeline.go(1014→121 lines, -88%),specialize.go(1384→142 lines, -90%) - ✅ Enhanced Documentation - Package-level docs explaining file responsibilities
- ✅ Test Coverage Maintained - All 2,847+ tests passing after refactoring
- ✅ Follows AI-First Design - 200-500 line sweet spot for AI context windows
Previous Release: v0.3.12 (October 2025)
Recovery Release:
- ✅
show()Builtin Restored - Polymorphic∀α. α -> stringwith full type dispatch - ✅ 51% Benchmark Recovery - Fixes 64/125 AILANG benchmarks that failed with "undefined variable: show"
- ✅ 35 Comprehensive Tests - Coverage for primitives, lists, records, ADTs, edge cases
- ✅ 3.5 hour implementation - On target with estimates (~350 LOC)
Previous Release: v0.3.11 (October 2025)
Critical Bug Fixes:
- ✅ Row Unification Fix - Fixed "closed row missing labels: [IO]" errors
- ✅ Effect Propagation - Corrected function application effect handling
- ✅ REPL Builtin Environment - Fixed builtin availability in REPL
- ✅ 3-layer Regression Tests - Added 12-case safety net
v0.3.10 (October 2025)
Bug Fixes:
- ✅ Multi-line ADT Parser - Parser now supports multi-line algebraic data type declarations
- ✅ Operator Lowering - Division operators correctly resolve to type-specific builtins
- ✅ 10.5% improvement in M-EVAL benchmarks (38.6% → 49.1% success rate)
~1,594 LOC added: Complete module execution infrastructure (Phases 1-4)
M-P4 implements comprehensive effect system infrastructure:
- ✅ Effect syntax parsing (
func f() -> int ! {IO, FS},\x. body ! {IO}) - ✅ 8 canonical effects: IO, FS, Net, Clock, Rand, DB, Trace, Async
- ✅ Effect validation with helpful error messages
- ✅ Effect elaboration (AST strings → typed effect rows)
- ✅ Type checking integration (effects thread to TFunc2.EffectRow)
- ✅ 46 tests passing (17 parser + 29 elaboration)
- ✅ Deterministic normalization (alphabetically sorted)
- ✅ Purity sentinel (
nil= pure function)
Foundation complete for runtime effect enforcement in v0.2.0. See CHANGELOG.md for details.
Previous Milestones:
- M-P3: Pattern Matching + ADT Runtime (~600 LOC)
- M-P2: Type System Hardening (parser coverage 69% → 70.8%)
- Type System Consolidation (unified TFunc2/TVar2)
Component Status
✅ Completed Components
Structured Error Reporting - Milestone A2 (v0.0.7)
- ✅ Unified Report Type (
internal/errors/report.go) - First-class error type with schemaailang.error/v1 - ✅ Error Flow Hardening - Errors survive through error chains using
errors.As() - ✅ Standardized Error Codes - IMP010, IMP011, IMP012, LDR001, MOD006
- ✅ CLI JSON Output -
--jsonand--compactflags for structured error reporting - ✅ Golden File Testing - Byte-for-byte reproducibility of error output
- ✅ CI Integration - Import tests with golden file validation
- ~680 lines of implementation + test files + golden files
Module System Foundation (v0.0.6)
- ✅ Error Code Taxonomy (
internal/errors/codes.go) - Structured error classification with 60+ error codes - ✅ Manifest System (
internal/manifest/) - Example status tracking and validation - ✅ Module Loader (
internal/module/loader.go) - Complete dependency resolution with cycle detection - ✅ Path Resolver (
internal/module/resolver.go) - Cross-platform import path handling - ~1,680 lines of production code + comprehensive tests
Lexer (Fully Working)
- Complete tokenization with Unicode support
- All token types: keywords, operators, literals, identifiers
- String escapes, comments, scientific notation
++operator for string concatenation- ~550 lines, all tests passing
Parser (Nearly Complete - 70.8% coverage)
- Recursive descent with Pratt parsing (~1,200 lines)
- ✅ Working: Basic expressions, let bindings, if-then-else, lists, records
- ✅ Working: Binary/unary operators with spec-compliant precedence
- ✅ Working: Lambda expressions with
\x.syntax and currying - ✅ Working: Record field access with correct precedence
- ✅ Working: Module declarations and import statements
- ✅ Working (M-P2): Type declarations - aliases, sum types, record types, nested records
- ✅ Working (M-P2): Export metadata tracking for type declarations
- ✅ Working (M-P2): REPL/file parsing parity for all type declarations
- ⚠️ Parsed but not evaluated: Pattern matching, type annotations
- ❌ Not working:
?operator, effect handlers, tuple type aliases
Type System (Complete with Type Classes)
- Hindley-Milner type inference with let-polymorphism
- Type class constraints with dictionary-passing
- Spec-aligned numeric defaulting (neutral vs primary classes)
- Principal row unification for records and effects
- Value restriction for sound polymorphism
- Kind system (Effect, Record, Row kinds)
- Linear capability capture analysis
- ~5,000+ lines total
Evaluator & Runtime (Full Module Execution!)
- Tree-walking interpreter with module execution runtime
- ✅ Working: Full module system with imports and exports
- ✅ Working: Effect system (IO, FS, Clock, Net) with capability security
- ✅ Working: Pattern matching with exhaustiveness checking
- ✅ Working: Recursion (self-recursive and mutually-recursive functions)
- ✅ Working: Block expressions (
{ stmt1; stmt2; result }) - ✅ Working: Records with subsumption and optional row polymorphism
- ✅ Working: Type classes (Num, Eq, Ord, Show) with dictionary-passing
- ✅ Working: Auto-import of std/prelude (zero imports for comparisons!)
- ✅ Working: Record update syntax (
{base | field: value}) - ✅ Working: Anonymous function syntax (
func(x: int) -> int { x * 2 }) - ✅ Working: Numeric conversions (
intToFloat,floatToInt)
REPL (Fully Operational)
- ✅ Professional Interactive REPL with type class support (~850 lines)
- ✅ Arrow key history navigation
- ✅ Persistent history across sessions
- ✅ Tab completion for REPL commands
- ✅ Proper :quit command
- ✅ Full type class resolution with dictionary-passing
- ✅ Module import system for loading instances
- ✅ Rich diagnostic commands
- ✅ Auto-imports std/prelude on startup
AI-First Features (v0.0.4)
- ✅ Schema Registry (
internal/schema/) - Versioned JSON schemas with forward compatibility - ✅ Error JSON Encoder (
internal/errors/) - Structured error reporting with taxonomy - ✅ Test Reporter (
internal/test/) - Machine-readable test results - ✅ Effects Inspector (
internal/repl/effects.go) - Type/effect introspection - ✅ Golden Test Framework (
testutil/) - Reproducible test fixtures - ~1,500 lines with 100% test coverage
⚠️ Known Issues & Limitations
What Works (48/66 examples passing - 72.7%)
- ✅ Full module execution with effects
- ✅ Recursion (self-recursive and mutually-recursive)
- ✅ Block expressions
- ✅ Records with subsumption
- ✅ Pattern matching with ADTs
- ✅ Type classes (Num, Eq, Ord, Show)
- ✅ Effects: IO, FS, Clock, Net
- ✅ REPL with full type checking
Current Limitations
- ⚠️ Pattern Guards - Parsed but not evaluated yet
- ⚠️ Error Propagation -
?operator not yet implemented - ⚠️ Deep Let Nesting - 4+ levels may fail
- ❌ Typed Quasiquotes - Planned for v0.4.0+
- ❌ CSP Concurrency - Planned for v0.4.0+
- ❌ Session Types - Planned for v1.0+
File Size Issues (Deferred to v0.3.9/v0.4.0)
6 files exceed the 800-line AI-friendly limit:
internal/pipeline/pipeline.go: 848 linesinternal/types/inference.go: 853 linesinternal/parser/parser_expr.go: 951 linesinternal/ast/ast.go: 841 linesinternal/eval/eval_typed.go: 879 linesinternal/eval/builtins.go: 815 lines
🚧 Planned Features
Upcoming (v0.4.0+)
- ✅
Module System- COMPLETE in v0.2.0 - ✅
Function Declarations- COMPLETE in v0.2.0 - ✅
Type Definitions- COMPLETE in v0.2.0 - ✅
Effect System- COMPLETE in v0.2.0-v0.3.0 - ✅
Standard Library- Core modules (std/io, std/fs, std/prelude) COMPLETE - Pattern Guards - Enhance pattern matching with boolean conditions
- Error Propagation -
?operator for Result types - Typed Quasiquotes - Safe metaprogramming with compile-time validation
- CSP/Channels - Concurrent programming support
- Session Types - Protocol verification
Future (v1.0+)
- Training Export: Execution trace collection for AI training
- Deterministic Time: Virtual clock for reproducible builds
- AI Debugging Tools: Structured execution traces
Lines of Code Summary
- Total Production Code: ~7,860 lines
- Core Components: ~6,360 lines
- AI Features: ~1,500 lines
- Test Coverage: 31.3% overall
Well-Tested Packages
test(95.7%)schema(87.9%)parser(75.8%)errors(75.9%)
Needs Testing
typedast(0%)eval(15.6%)types(20.3%)