diff options
author | Joris | 2015-11-22 02:09:36 +0100 |
---|---|---|
committer | Joris | 2015-11-22 02:09:36 +0100 |
commit | 75e3bb69a3fec4be8850833da5cd11bbabcd99b7 (patch) | |
tree | 5ecec3bbfdfc559280e9793609bab0199b168d07 | |
parent | b977bb5ba3d5ad8f8008aa4ceb60d1f988a82a0a (diff) |
Minor style modification
-rw-r--r-- | src/Main.hs | 9 | ||||
-rw-r--r-- | src/Notification.hs | 6 |
2 files changed, 6 insertions, 9 deletions
diff --git a/src/Main.hs b/src/Main.hs index b2b0408..2cd4c28 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -18,9 +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 - (Right birthdates, Right config) -> do - Notification.todayAndNextWeek birthdates config + (Left err, _) -> RenderError.birthdate err + (_, Left err) -> RenderError.config err + (Right birthdates, Right config) -> notifyTodayAndNextWeek birthdates config diff --git a/src/Notification.hs b/src/Notification.hs index e5abe45..18cd260 100644 --- a/src/Notification.hs +++ b/src/Notification.hs @@ -1,7 +1,7 @@ {-# LANGUAGE OverloadedStrings #-} module Notification - ( todayAndNextWeek + ( notifyTodayAndNextWeek ) where import qualified Data.Text as T @@ -14,8 +14,8 @@ import Model.Birthdate (Birthdate, filterBirthdayAt, filterBirthdayBetween) import Model.Mail (mailSubject, mailBody) import Model.Config -todayAndNextWeek :: [Birthdate] -> Config -> IO () -todayAndNextWeek birthdates config = do +notifyTodayAndNextWeek :: [Birthdate] -> Config -> IO () +notifyTodayAndNextWeek birthdates config = do currentDate <- getCurrentDate birthdaysToday <- filterBirthdaysToday birthdates birthdaysNextWeek <- filterBirthdaysNextWeek birthdates config |