aboutsummaryrefslogtreecommitdiff
path: root/Main.hs
diff options
context:
space:
mode:
authorRaúl Benencia <rul@kalgan.cc>2013-08-25 00:59:04 -0300
committerRaúl Benencia <rul@kalgan.cc>2013-08-25 00:59:04 -0300
commit56dce7c4feada1d4ca93a312e48813fb1918b93b (patch)
tree0b49a6b2c9adefa0d3d6f989a84bfd654f9d1578 /Main.hs
parent4728bb04b2f5daff7a2ed8c30dd0fd8a8ee9539b (diff)
advancing in the monads transformers implementation
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/Main.hs b/Main.hs
index 5b3d6bc..65a29af 100644
--- a/Main.hs
+++ b/Main.hs
@@ -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)
nihil fit ex nihilo