mirror of
https://git.nerfingen.de/nerf/choirMail.git
synced 2025-05-15 09:50:29 +00:00
minimized text vs lazytext conversions between lib calls
This commit is contained in:
parent
3deede4516
commit
4bc23000bd
3 changed files with 28 additions and 26 deletions
|
@ -22,7 +22,7 @@ getToday :: IO Day
|
|||
getToday = utctDay <$> getCurrentTime
|
||||
|
||||
reportErrorLocal :: MonadIO m => String -> m ()
|
||||
reportErrorLocal err = liftIO $ hPutStr stderr err
|
||||
reportErrorLocal = liftIO . hPutStr stderr
|
||||
|
||||
reportErrorMail :: MonadIO m => Config -> String -> m ()
|
||||
reportErrorMail config error' = send (mailDomain config) (mailUsername config) (mailPassword config) (mailErrorTo config) (mailFrom config) "choirMail Error" (LT.pack error')
|
||||
|
@ -31,7 +31,7 @@ findChoirDay :: Day -> [MailRecord] -> Either String MailRecord
|
|||
findChoirDay today table = maybe
|
||||
(Left "Keine Probe :(")
|
||||
(Right)
|
||||
(L.find ((isChoirThisWeek today) .date) table)
|
||||
(L.find ((isChoirThisWeek today) . date) table)
|
||||
|
||||
|
||||
main' :: App ()
|
||||
|
@ -63,7 +63,7 @@ main = do
|
|||
Left error' -> reportErrorLocal error'
|
||||
|
||||
mailText :: MailRecord -> LT.Text
|
||||
mailText record = LT.fromStrict $T.concat ["Guten Morgen,\n\n"
|
||||
mailText record = LT.concat ["Guten Morgen,\n\n"
|
||||
, announcement record
|
||||
,"\n\ndiesen Donnerstag\n\nDurchsingen: "
|
||||
,song1 record
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue