drop HOAS, add Monad stack.

HOAS was dropped while fixing unrelated bug, but I think I'll keep it
out.
This commit is contained in:
2024-04-11 19:57:02 -07:00
parent 6a59aa97f8
commit a9c72d5a6d
6 changed files with 58 additions and 37 deletions

View File

@@ -21,7 +21,7 @@ parameters {0 m : Type -> Type} {auto _ : MonadError String m}
-- TODO icit
let var = VVar (length ctx.env)
let ctx' = extend ctx nm a
tm' <- check ctx' tm (b var)
tm' <- check ctx' tm (b $$ var)
pure $ Lam nm icit tm'
other => throwError "Expected pi type \{show $ quote 0 ty}"
@@ -44,7 +44,7 @@ parameters {0 m : Type -> Type} {auto _ : MonadError String m}
case tty of
(VPi str icit' a b) => do
u <- check ctx u a
pure (App t u, b (eval ctx.env t))
pure (App t u, b $$ eval ctx.env t)
_ => throwError "Expected Pi type"
infer ctx RU = pure (U, VU) -- YOLO
infer ctx (RPi nm icit ty ty2) = do