This commit is contained in:
2026-04-19 04:17:45 +00:00
commit a154e2b98c
14 changed files with 617 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
import BidirTT
open BidirTT
def runOne (label : String) (r : Raw) : IO Unit := do
match checkTop r with
| .ok (t, ty) =>
IO.println s!"[ok] {label}"
IO.println s!" term : {BidirTT.prettyTm t}"
match quote 0 ty with
| Except.ok qt =>
IO.println s!" type : {BidirTT.prettyTm qt}"
| Except.error err =>
IO.println s!" type : <error: {err}>"
| .error e =>
IO.println s!"[err] {label}: {e}"
def main : IO Unit := do
runOne "U0" Examples.univ0
runOne "id" Examples.idAnn
runOne "const" Examples.constAnn
runOne "swap" Examples.swapAnn
runOne "depPair" Examples.depPairAnn
runOne "depPair.1" Examples.fstDepPair
runOne "depPair.2" Examples.sndDepPair
runOne "let universe" Examples.letUniverse
runOne "omega (bad)" Examples.omegaAnn
runOne "unknown var" Examples.unknownVar
runOne "pair mismatch" Examples.pairMismatch
runOne "bad fst" Examples.badFst