aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2024-02-26 21:27:58 +0100
committerTom Smeding <tom@tomsmeding.com>2024-02-26 21:27:58 +0100
commit49f4a26867eb81eb59cfea78374bb09dd45edfa3 (patch)
tree1eb9960af8144802f459f4ba2a411f9df1d47731 /app
parentfb1f3d1f4d53f4db9c43645e647720b77750f58d (diff)
Diagnostics refactor
Diffstat (limited to 'app')
-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