mechanism for multiple errors printed at end of file
This commit is contained in:
10
src/Main.idr
10
src/Main.idr
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user