Replace the listy context API with indexed lookups and explicit scope invariants
This commit is contained in:
+1
-1
@@ -46,7 +46,7 @@ mutual
|
||||
partial def infer (cxt : Cxt) : Raw → TCM (Tm × Val)
|
||||
| .var x =>
|
||||
match cxt.lookup x with
|
||||
| some (i, a) => pure (.var i, a)
|
||||
| some (i, a) => pure (.var i.val, a)
|
||||
| none => throw s!"unknown variable {x}"
|
||||
| .nat => pure (.nat, .univ 0)
|
||||
| .zero => pure (.zero, .nat)
|
||||
|
||||
Reference in New Issue
Block a user