From 720372e3deac26a064fb1c711db2ccf54e655fab Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sat, 17 Feb 2024 12:04:53 +0100 Subject: Lots of parser work --- src/Main.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Main.hs') diff --git a/src/Main.hs b/src/Main.hs index c9de0cc..750f749 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -2,6 +2,7 @@ {-# LANGUAGE TupleSections #-} module Main where +import Data.List (intersperse) import System.Environment (getArgs) import System.Exit (die, exitFailure) @@ -17,10 +18,10 @@ main = do prog <- case parse fname source of This errs -> do - mapM_ (putStrLn . printErrMsg) errs + sequence_ $ intersperse (putStrLn "") (map (putStrLn . printErrMsg) errs) exitFailure These errs res -> do - mapM_ (putStrLn . printErrMsg) errs + sequence_ $ intersperse (putStrLn "") (map (putStrLn . printErrMsg) errs) return res That res -> return res -- cgit v1.2.3-70-g09d2