Skip to content

Commit 5e6774c

Browse files
Jonathan D.A. Jewellclaude
andcommitted
wip: partial fixes for Parser.lean type errors
Changes across multiple files to address Lean 4 type system issues: AST.lean: - Add ToString instance for NormalForm (1NF, 2NF, 3NF, BCNF, 4NF) IR.lean: - Add ToString instance for ValidationLevel - Add DecompositionStrategy type for normalization - Simplify IR.Select to use Unit instead of polymorphic type - Rename 'from' field to 'from_' (Lean keyword conflict) - Fix CBOR serialization calls (use Serialization.encodeCBOR) - Fix serializeProof to use CBOR simple value 21 for true Parser.lean: - Comment out parseToIR function (type inference failures) - Replace with axiom stub for now - Comment out example functions (unknown identifier 'Statement' errors) Status: Parser module still has 15+ type errors that need deeper fixes. The core parser combinators have type mismatches with Lean 4 expectations. Lexer, TypeInference, and core IR modules continue to work correctly. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent d2d405c commit 5e6774c

File tree

3 files changed

+138
-129
lines changed

3 files changed

+138
-129
lines changed

src/FbqlDt/AST.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,15 @@ inductive NormalForm where
9999
| nf4 : NormalForm
100100
deriving Repr
101101

102+
-- ToString for NormalForm
103+
instance : ToString NormalForm where
104+
toString
105+
| .nf1 => "1NF"
106+
| .nf2 => "2NF"
107+
| .nf3 => "3NF"
108+
| .bcnf => "BCNF"
109+
| .nf4 => "4NF"
110+
102111
-- Type-safe values indexed by their types
103112
-- DEPENDS ON: TypeExpr
104113
inductive TypedValue : TypeExpr → Type where

0 commit comments

Comments
 (0)