From 463ddc636b755a3037720c03a3cbb29d073a2b66 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Mon, 10 Mar 2008 15:19:50 +0000 Subject: [PATCH] Changed the running of the PassM monad to use the new mechanism --- Main.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Main.hs b/Main.hs index dceb8b1..6074c44 100644 --- a/Main.hs +++ b/Main.hs @@ -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)