aboutsummaryrefslogtreecommitdiff
path: root/Main.hs
diff options
context:
space:
mode:
authorRaúl Benencia <rul@kalgan.cc>2013-09-05 19:57:02 -0300
committerRaúl Benencia <rul@kalgan.cc>2013-09-05 19:57:02 -0300
commit3bd3fd2c6eae2f36f69f247403421e8cf8226394 (patch)
tree0d92cd91d69cf52b9168c403af317643e88c2587 /Main.hs
parent41b53ca04b6d52457f331930e8fea68416498882 (diff)
Moved all code to src/
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs49
1 files changed, 0 insertions, 49 deletions
diff --git a/Main.hs b/Main.hs
deleted file mode 100644
index 2144d9c..0000000
--- a/Main.hs
+++ /dev/null
@@ -1,49 +0,0 @@
-{- Main module
- -
- - Copyright 2013 Raúl Benencia <rul@kalgan.cc>
- -
- - Licensed under the GNU GPL version 3 or higher
- -
- -}
-
-module Main (main) where
-
-import Control.Monad.Reader(runReaderT)
-import Control.Monad.State(runStateT)
-import System.Environment
-import System.Exit
-import System.FilePath(takeDirectory)
-
-import Lazymail.Config(customConfig)
-import Lazymail.Email
-import Lazymail.Maildir
-import Lazymail.Screen
-import Lazymail.State
-import Lazymail.Types
-
-parse ["-h"] = usage >> exit
-parse ["--help"] = usage >> exit
-parse ["-v"] = version >> exit
-parse ["--version"] = version >> exit
-parse _ = run entryPoint
-
-run :: Lazymail a -> IO (a, LazymailState)
-run k =
- let config = customConfig
- state = initialState { basePath = initialPath config }
- in runStateT (runReaderT k config) state
-
-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)
-
-main :: IO ()
-main = do
- args <- getArgs
- parse args
- putStrLn "Game over!"
nihil fit ex nihilo