From 56dce7c4feada1d4ca93a312e48813fb1918b93b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Benencia?= Date: Sun, 25 Aug 2013 00:59:04 -0300 Subject: advancing in the monads transformers implementation --- Main.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Main.hs') 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] " ," where 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) -- cgit v1.2.3