From 49f4a26867eb81eb59cfea78374bb09dd45edfa3 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Mon, 26 Feb 2024 21:27:58 +0100 Subject: Diagnostics refactor --- app/Main.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/Main.hs') 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 -- cgit v1.2.3-70-g09d2