From a9bc46efe3624344573f96fafa8af194016183a2 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 22 Nov 2015 20:36:59 +0100 Subject: Exit failure when there are parsing errors --- src/Main.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Main.hs') diff --git a/src/Main.hs b/src/Main.hs index a9d5731..3a34269 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -6,7 +6,7 @@ module Main import qualified Data.Text.IO as T -import qualified RenderError +import Exit (exitWithParsingError) import Notification (notifyTodayAndNextWeek) import Model.Config @@ -18,6 +18,6 @@ main = do eitherBirthdates <- parseBirthdates <$> T.readFile Path.birthdate eitherConfig <- getConfig Path.config case (eitherBirthdates, eitherConfig) of - (Left err, _) -> RenderError.birthdate err - (_, Left err) -> RenderError.config err + (Left err, _) -> exitWithParsingError Path.birthdate err + (_, Left err) -> exitWithParsingError Path.config err (Right birthdates, Right config) -> notifyTodayAndNextWeek birthdates config -- cgit v1.2.3