mechanism for multiple errors printed at end of file

This commit is contained in:
2024-09-18 22:21:10 -07:00
parent 4f7b78f056
commit 38f01065eb
6 changed files with 41 additions and 13 deletions

View File

@@ -55,9 +55,17 @@ processFile fn = do
Right _ <- tryError $ traverse_ processDecl (collectDecl res.decls)
| Left y => fail (showError src y)
dumpContext !get
top <- get
dumpContext top
dumpSource
[] <- readIORef top.errors
| errors => do
for_ errors $ \err =>
putStrLn (showError src err)
exitFailure
pure ()
main' : M ()
main' = do
args <- getArgs