diff options
author | Raúl Benencia <rul@kalgan.cc> | 2013-08-25 00:59:04 -0300 |
---|---|---|
committer | Raúl Benencia <rul@kalgan.cc> | 2013-08-25 00:59:04 -0300 |
commit | 56dce7c4feada1d4ca93a312e48813fb1918b93b (patch) | |
tree | 0b49a6b2c9adefa0d3d6f989a84bfd654f9d1578 /Main.hs | |
parent | 4728bb04b2f5daff7a2ed8c30dd0fd8a8ee9539b (diff) |
advancing in the monads transformers implementation
Diffstat (limited to 'Main.hs')
-rw-r--r-- | Main.hs | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -21,6 +21,7 @@ import System.Environment import System.Exit import System.FilePath(takeDirectory) +import Lazymail import Email import Maildir import Screen @@ -30,15 +31,15 @@ parse ["-h"] = usage >> exit parse ["-v"] = version >> exit parse [md] = do putStrLn $ "Maildirs directory: " ++ md - entryPoint $ initState { initPath = md } - -parse []= usage >> die + run entryPoint + +parse [] = usage >> die usage = putStrLn . unlines $ usageText where usageText = ["Usage: ./Main [-vh] <maildirs>" ," where <maildirs> is a directory with Maildirs, or a Maildir itself." ," Lazymail will recursively search for Maildirs. "] - + version = putStrLn "Haskell lazymail 0.0001" exit = exitWith ExitSuccess die = exitWith (ExitFailure 1) |