diff options
author | Joris | 2016-04-04 22:48:33 +0200 |
---|---|---|
committer | Joris | 2016-04-04 22:48:33 +0200 |
commit | d8eedc3e2639f0f50f0554f89dc121da4941d4d1 (patch) | |
tree | 81bd4d0a261b0550a0501ad2f70fa52b4ee21000 /src/Main.hs | |
parent | e66ea0b49c8f7202114df366668598026f211eba (diff) |
Rename birthday to event
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 16 |
1 files changed, 8 insertions, 8 deletions
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 |