From 75e3bb69a3fec4be8850833da5cd11bbabcd99b7 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 22 Nov 2015 02:09:36 +0100 Subject: Minor style modification --- src/Main.hs | 9 +++------ 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 -- cgit v1.2.3