fix env (should have used an index...)

This commit is contained in:
2025-07-10 13:43:57 -04:00
parent cee1519b8e
commit 9bd9ab21b6
5 changed files with 86 additions and 8 deletions

View File

@@ -74,7 +74,7 @@ tryEval env (VRef fc k sp) = do
catchError (
do
debug $ \ _ => "app \{show name} to \{show sp}"
vtm <- eval Nil CBN tm
vtm <- eval env CBN tm
debug $ \ _ => "tm is \{render 90 $ pprint Nil tm}"
val <- vappSpine vtm sp
case val of
@@ -86,7 +86,9 @@ tryEval env (VRef fc k sp) = do
VLetRec _ _ _ _ _ => pure Nothing
v => pure $ Just v)
(\ _ => pure Nothing)
_ => pure Nothing
_ => do
debug $ \ _ => "tryEval blocked on undefined \{show k}"
pure Nothing
tryEval _ _ = pure Nothing