Skip to content

Commit

Permalink
eliminate sorries when generating the typechecking expression (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurpaulino authored Nov 7, 2024
1 parent 4770cdb commit dd545c2
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions Yatima/Common/GenTypechecker.lean
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ def genTypechecker : IO $ Except String Expr := do
Lean.setLibsPaths
return Yatima.CodeGen.codeGen (← Lean.runFrontend tcCode default) `tc

-- TODO: Getting the
/-- (= (tc decl) 1) ; tc being an expression -/
def mkRawTypecheckingExpr (tc : Expr) (decl : Digest) : Expr :=
Expr.op₂ .numEq
(.app tc (.atom $ .commit decl))
(.atom $ .num $ .ofNat 1)

def mkRawTypecheckingExpr (tc : Expr) (decl : Digest) : Expr := sorry
-- ⟦(= $(Expr.app tc ⟦#c$decl⟧) 1)⟧

def mkCommTypecheckingExpr (tc decl : Digest) : Expr := sorry
-- ⟦(= ((eval (open $tc)) $decl) 1)⟧
/-- (= (tc decl) 1) ; tc being a commitment -/
def mkCommTypecheckingExpr (tc decl : Digest) : Expr :=
Expr.op₂ .numEq
(.app (.atom $ .commit tc)
(.atom $ .commit decl))
(.atom $ .num $ .ofNat 1)

0 comments on commit dd545c2

Please sign in to comment.