Add more stuff to equality and more logging

Need to get names in there though.
This commit is contained in:
2024-07-16 22:07:37 -07:00
parent c0f9262c9a
commit 3d477be52b
6 changed files with 120 additions and 88 deletions

View File

@@ -7,6 +7,7 @@ import Control.Monad.State
import Data.List
import Data.String
import Data.Vect
import Data.IORef
import Lib.Check
import Lib.Parser
import Lib.Parser.Impl
@@ -31,7 +32,6 @@ App, but we have a way to make that work on javascript.
I still want to stay in MonadError outside this file though.
-}
@@ -73,6 +73,14 @@ processDecl (Def nm raw) = do
putStrLn "vty is \{show vty}"
tm <- check (mkCtx ctx.metas) raw vty
putStrLn "Ok \{show tm}"
mc <- readIORef ctx.metas
for_ mc.metas $ \case
(Solved k x) => pure ()
(Unsolved (l,c) k xs) => do
-- putStrLn "ERROR at (\{show l}, \{show c}): Unsolved meta \{show k}"
throwError $ E (l,c) "Unsolved meta \{show k}"
put (addDef ctx nm tm ty)
processDecl (DCheck tm ty) = do