From d8eedc3e2639f0f50f0554f89dc121da4941d4d1 Mon Sep 17 00:00:00 2001 From: Joris Date: Mon, 4 Apr 2016 22:48:33 +0200 Subject: Rename birthday to event --- src/Main.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/Main.hs') diff --git a/src/Main.hs b/src/Main.hs index 3a34269..bc9b112 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -9,15 +9,15 @@ import qualified Data.Text.IO as T import Exit (exitWithParsingError) import Notification (notifyTodayAndNextWeek) -import Model.Config -import Model.BirthdateParser (parseBirthdates) +import Model.Conf +import Model.EventParser (parseEvents) import qualified Model.Path as Path main :: IO () main = do - eitherBirthdates <- parseBirthdates <$> T.readFile Path.birthdate - eitherConfig <- getConfig Path.config - case (eitherBirthdates, eitherConfig) of - (Left err, _) -> exitWithParsingError Path.birthdate err - (_, Left err) -> exitWithParsingError Path.config err - (Right birthdates, Right config) -> notifyTodayAndNextWeek birthdates config + eitherEvents <- parseEvents <$> T.readFile Path.event + eitherConf <- getConf Path.conf + case (eitherEvents, eitherConf) of + (Left err, _) -> exitWithParsingError Path.event err + (_, Left err) -> exitWithParsingError Path.conf err + (Right events, Right conf) -> notifyTodayAndNextWeek events conf -- cgit v1.2.3