module Main (main) where import Postdelay.Scan import Control.Monad.IO.Class import Control.Monad.Trans.Except main :: MonadIO m => m () main = do mailStr <- liftIO getContents delay <- runExceptT $ scan mailStr case delay of Left err -> do liftIO . putStrLn $ show err sendNow mailStr Right Nothing -> sendNow mailStr Right (Just d) -> sendLater mailStr d sendNow :: MonadIO m => String -> m () sendNow = undefined sendLater :: MonadIO m => String -> Delay -> m () sendLater = undefined