diff --git a/app/Main.hs b/app/Main.hs index b4a07b7..b2dd598 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -1,8 +1,14 @@ module Main where import Lib +import System.Environment main :: IO () main = do - md <- readFile "test.md" - sequence_ $ sequence . fmap print <$> getMails md + args <- getArgs + case args of + [fn] -> do + md <- readFile fn + sequence_ $ sequence . fmap print <$> getMails md + _ -> do + print "please call with markdown-file"