aboutsummaryrefslogtreecommitdiff
path: root/app/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/Main.hs')
-rw-r--r--app/Main.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/Main.hs b/app/Main.hs
index b88d508..bf4fcfd 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -6,6 +6,7 @@ import Data.List (intersperse)
import System.Environment (getArgs)
import System.Exit (die, exitFailure)
+import HSVIS.Diagnostic
import HSVIS.Parser
@@ -17,12 +18,11 @@ main = do
_ -> die "Usage: hs-visinter [filename.hs]"
prog <- case parse fname source of
- This errs -> do
- sequence_ $ intersperse (putStrLn "") (map (putStrLn . printErrMsg) errs)
+ (errs, Nothing) -> do
+ sequence_ $ intersperse (putStrLn "") (map (putStrLn . printDiagnostic) errs)
exitFailure
- These errs res -> do
- sequence_ $ intersperse (putStrLn "") (map (putStrLn . printErrMsg) errs)
+ (errs, res) -> do
+ sequence_ $ intersperse (putStrLn "") (map (putStrLn . printDiagnostic) errs)
return res
- That res -> return res
print prog