diff options
author | defanor <defanor@uberspace.net> | 2017-11-11 12:00:08 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2017-11-11 12:00:08 +0300 |
commit | 138d9cd77379b831a4a0376a991ae768a0652846 (patch) | |
tree | ea1bc1da2229774a854ece632891f3daafda7068 | |
parent | 10de4a7c4b32944bbbbcea5477d2d1dec07da203 (diff) |
Fix shortcut command parsing
-rw-r--r-- | Pancake/Command.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Pancake/Command.hs b/Pancake/Command.hs index 6adc51d..57b80c2 100644 --- a/Pancake/Command.hs +++ b/Pancake/Command.hs @@ -69,8 +69,7 @@ goTo = do -- | 'Shortcut' command parser. shortcut :: M.Map String String -> Parser Command shortcut m = do - s <- choice $ map (try . string) $ M.keys m - _ <- space + s <- choice $ map (\k -> try (string k <* space)) $ M.keys m case M.lookup s m of Nothing -> fail $ "No such shortcut: " ++ s Just u -> do |