Changed the running of the PassM monad to use the new mechanism

This commit is contained in:
Neil Brown 2008-03-10 15:19:50 +00:00
parent 20843f70a4
commit 463ddc636b

View File

@ -161,11 +161,10 @@ main = do
ModeFull -> evalStateT (compileFull fn fileStem) []
-- Run the compiler.
-- TODO still get the warnings back in future
v <- runPassM operation initState
v <- runWriterT $ evalStateT (runErrorT operation) initState
case v of
Left e -> {- showWarnings ws >> -} dieIO e
Right (_, _, ws) -> showWarnings ws
(Left e, ws) -> showWarnings ws >> dieIO e
(Right r, ws) -> showWarnings ws
removeFiles :: [FilePath] -> IO ()
removeFiles = mapM_ (\file -> catch (removeFile file) doNothing)