From 4d8650e920971693554999a07d19af5ff6e492fb Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 21 Oct 2020 21:19:16 -0400 Subject: [PATCH] Factor whole around. --- src/Facet/REPL.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Facet/REPL.hs b/src/Facet/REPL.hs index 9d921e43d..8cb699208 100644 --- a/src/Facet/REPL.hs +++ b/src/Facet/REPL.hs @@ -183,15 +183,15 @@ commands :: [Command Action] commands = [ Command ["help", "h", "?"] "display this list of commands" $ Pure Help , Command ["quit", "q"] "exit the repl" $ Pure Quit - , Command ["show"] "show compiler state" $ Meta "target" $ Show <$> choice - [ Paths <$ whole (token (string "paths")) - , Modules <$ whole (token (string "modules")) + , Command ["show"] "show compiler state" $ Meta "target" $ whole $ Show <$> choice + [ Paths <$ token (string "paths") + , Modules <$ token (string "modules") ] - , Command ["add"] "add a module/path to the repl" $ Meta "path" $ choice + , Command ["add"] "add a module/path to the repl" $ Meta "path" $ whole $ choice [ Add Paths <$ token (string "path") <*> path' , Add Modules <$ token (string "module") <*> path' ] - , Command ["remove", "rm"] "remove a module/path from the repl" $ Meta "path" $ choice + , Command ["remove", "rm"] "remove a module/path from the repl" $ Meta "path" $ whole $ choice [ Remove Paths <$ token (string "path") <*> path' , Remove Modules <$ token (string "module") <*> path' ]