Commit 9d58504d authored by Nicolas Lenz's avatar Nicolas Lenz
Browse files

Accept multiple lines from stdio and add --help option

parent e35d724e
......@@ -10,9 +10,10 @@ import System.Environment
main :: IO ()
main = do
args <- getArgs
case length args of
0 -> putStrLn help
1 -> getLine >>= (\text -> handle [head args, text])
case args of
[] -> putStrLn help
["--help"] -> putStrLn help
[_] -> getContents >>= (\text -> handle [head args, text])
_ -> handle args
handle :: [String] -> IO ()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment