diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-05-08 00:40:02 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-05-08 00:40:02 +0200 |
commit | c69563da3ea55820af21edb7cf2af40906630e6e (patch) | |
tree | 31ec3fb8ff281365b10a92e8c7ba439e3de9822c /src/Main.hs | |
parent | 99b12580b0ef0592dbfb5da04070114314e9b7f8 (diff) | |
download | 2017-01-16_17:13:37-c69563da3ea55820af21edb7cf2af40906630e6e.tar 2017-01-16_17:13:37-c69563da3ea55820af21edb7cf2af40906630e6e.tar.gz 2017-01-16_17:13:37-c69563da3ea55820af21edb7cf2af40906630e6e.tar.bz2 2017-01-16_17:13:37-c69563da3ea55820af21edb7cf2af40906630e6e.tar.xz 2017-01-16_17:13:37-c69563da3ea55820af21edb7cf2af40906630e6e.zip |
command parsing
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs index 0088b7c..c3c1d7e 100644 --- a/src/Main.hs +++ b/src/Main.hs | |||
@@ -38,7 +38,8 @@ runCli = do | |||
38 | case input of | 38 | case input of |
39 | Nothing -> liftIO exitSuccess | 39 | Nothing -> liftIO exitSuccess |
40 | Just input' -> do | 40 | Just input' -> do |
41 | case parseCmd input' of | 41 | cmd <- parseCmd input' |
42 | case cmd of | ||
42 | UnknownCommand help -> do | 43 | UnknownCommand help -> do |
43 | lift . outputStrLn $ help | 44 | lift . outputStrLn $ help |
44 | ParseError err -> do | 45 | ParseError err -> do |
@@ -46,5 +47,6 @@ runCli = do | |||
46 | Empty -> return () | 47 | Empty -> return () |
47 | 48 | ||
48 | Quit -> liftIO exitSuccess | 49 | Quit -> liftIO exitSuccess |
50 | |||
49 | _ -> undefined | 51 | _ -> undefined |
50 | runCli | 52 | runCli |