aboutsummaryrefslogtreecommitdiff
path: root/Main.hs
diff options
context:
space:
mode:
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