Skip to content

Commit 584857a

Browse files
Jonathan D.A. Jewellclaude
andcommitted
feat(typing): fix panics and add type annotation checking
- Replace panic on string literals with TypeError::UnallocatedStringLiteral - Add TypeError::AnnotationMismatch for let/let_lin type annotations - check_let and check_let_lin now verify declared types match inferred - Add 21 new tests covering pairs, sums, regions, functions, copy/drop, modules, arithmetic, and type annotation validation (10 -> 31 total) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 89e7ae5 commit 584857a

2 files changed

Lines changed: 509 additions & 23 deletions

File tree

STATE.scm

Lines changed: 115 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,132 @@
66
(version "1.0")
77
(schema-version "1.0")
88
(created "2026-02-04")
9-
(updated "2026-02-04")
9+
(updated "2026-02-06")
1010
(project "ephapax")
1111
(repo "hyperpolymath/ephapax"))
1212

1313
(project-context
14-
(name "ephapax")
15-
(tagline "TODO: Add project description")
16-
(tech-stack ()))
14+
(name "Ephapax")
15+
(tagline "Linear type system with once-only evaluation and formal Coq proofs")
16+
(tech-stack ("rust" "idris2" "coq" "zig")))
1717

1818
(current-position
19-
(phase "development")
20-
(overall-completion 0)
21-
(components ())
22-
(working-features ()))
19+
(phase "type-checker-and-wasm")
20+
(overall-completion 55)
21+
(components
22+
(("lexer" "Tokenization with logos (736 LOC)" 100)
23+
("parser" "Full parser with chumsky (1240 LOC)" 100)
24+
("syntax" "AST definitions (328 LOC)" 100)
25+
("interpreter" "Tree-walking interpreter (832 LOC)" 100)
26+
("typing" "Type checker - in progress (1002 LOC)" 60)
27+
("wasm-backend" "WASM code generation - in progress (1219 LOC)" 40)
28+
("ir" "S-expression intermediate representation (758 LOC)" 100)
29+
("runtime" "Runtime support (211 LOC)" 80)
30+
("stdlib" "Standard library skeleton (290 LOC)" 40)
31+
("repl" "Interactive shell (398 LOC)" 100)
32+
("cli" "Command-line interface (460 LOC)" 100)
33+
("vram-cache" "VRAM caching layer (363 LOC)" 80)
34+
("coq-proofs" "Syntax, typing rules, operational semantics (619 LOC)" 100)
35+
("idris2-abi" "Experimental two-stage compiler (parser/typechecker)" 30)
36+
("zig-ffi" "C ABI compatibility layer (1620 LOC across 40 files)" 70)
37+
("ephapax-proven" "Formally verified data structures (LRU, Buffer, Resource, Queue, Set, Hex)" 90)
38+
("ephapax-proven-ffi" "Zig FFI for proven data structures" 70)
39+
("debugger" "Not started" 0)
40+
("lsp" "Not started" 0)
41+
("package-manager" "Not started" 0)))
42+
(working-features
43+
("Full lexer/parser/interpreter/REPL/CLI pipeline"
44+
"S-expression intermediate representation"
45+
"Formal Coq proofs: syntax formalization, linear typing rules, operational semantics with soundness"
46+
"Experimental Idris2 -> Rust two-stage compiler (parser/typechecker in Idris2, WASM backend in Rust)"
47+
"ephapax-proven library: 6 formally verified data structures"
48+
" - LRU cache, Buffer, Resource tracker, Queue, Set, Hex encoding"
49+
" - 113 tests (45 unit + 17 integration + 51 doc)"
50+
"Zig FFI layer: C ABI compatibility for proven data structures"
51+
"15+ example programs (.eph files)"
52+
"Conformance test suite (pass/fail directories)"
53+
"VRAM caching layer for GPU-accelerated operations"
54+
"12-crate Rust workspace (~7,918 LOC total)")))
2355

2456
(route-to-mvp
2557
(milestones
2658
((milestone-id "m1")
27-
(name "Initial Setup")
28-
(items ("Add project description"
29-
"Define tech stack"
30-
"Set up initial features")))))
59+
(name "Core Language")
60+
(status "complete")
61+
(completion 100)
62+
(items ("Lexer with logos"
63+
"Parser with chumsky"
64+
"AST definitions"
65+
"Tree-walking interpreter"
66+
"REPL and CLI"
67+
"S-expression IR")))
68+
69+
((milestone-id "m2")
70+
(name "Formal Verification")
71+
(status "complete")
72+
(completion 100)
73+
(items ("Coq syntax formalization (Syntax.v)"
74+
"Linear typing rules (Typing.v)"
75+
"Operational semantics with soundness proofs (Semantics.v)")))
76+
77+
((milestone-id "m3")
78+
(name "Type Checker")
79+
(status "in-progress")
80+
(completion 60)
81+
(items ("Linear type inference engine (in progress)"
82+
"Affine type tracking"
83+
"Use-once enforcement"
84+
"Type error reporting")))
85+
86+
((milestone-id "m4")
87+
(name "WASM Backend")
88+
(status "in-progress")
89+
(completion 40)
90+
(items ("WASM code generation module (started)"
91+
"Linear type lowering to WASM"
92+
"Memory management for linear resources"
93+
"Browser and server target support")))
94+
95+
((milestone-id "m5")
96+
(name "Proven Data Structures")
97+
(status "in-progress")
98+
(completion 90)
99+
(items ("LRU cache (done)"
100+
"Buffer (done)"
101+
"Resource tracker (done)"
102+
"Queue (done)"
103+
"Set (done)"
104+
"Hex encoding (done)"
105+
"Rust wrappers (done)"
106+
"Zig FFI bindings (done)"
107+
"Full integration tests (done)")))))
31108

32109
(blockers-and-issues
33-
(critical ())
34-
(high ())
35-
(medium ())
36-
(low ()))
110+
(critical
111+
("Type checker incomplete - critical path to MVP"))
112+
(high
113+
("WASM backend in early stages"
114+
"Standard library is skeletal (290 LOC)"))
115+
(medium
116+
("Idris2 two-stage compiler is experimental, not production-ready"
117+
"No LSP server"
118+
"No debugger"))
119+
(low
120+
("VRAM cache needs GPU testing on real hardware")))
37121

38122
(critical-next-actions
39-
(immediate ("Update STATE.scm with project details"))
40-
(this-week ())
41-
(this-month ()))))
123+
(immediate
124+
("Complete linear type checker with use-once enforcement"
125+
"Expand type error reporting with hints"))
126+
(this-week
127+
("Advance WASM code generation for basic programs"
128+
"Expand standard library beyond skeleton"))
129+
(this-month
130+
("Achieve end-to-end: source -> type check -> WASM output"
131+
"Begin LSP server implementation"
132+
"Stabilize Idris2 two-stage compiler")))
133+
134+
(session-history
135+
((date "2026-02-06")
136+
(accomplishments
137+
("Updated STATE.scm with accurate project status from code audit"))))))

0 commit comments

Comments
 (0)