From 138d9cd77379b831a4a0376a991ae768a0652846 Mon Sep 17 00:00:00 2001 From: defanor Date: Sat, 11 Nov 2017 12:00:08 +0300 Subject: Fix shortcut command parsing --- Pancake/Command.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Pancake/Command.hs') 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 -- cgit v1.2.3