1module Idris.REPLParser(parseCmd) where
7import Text.ParserCombinators.Parsec
8import Text.ParserCombinators.Parsec.Expr
9import Text.ParserCombinators.Parsec.Language
10import qualified Text.ParserCombinators.Parsec.Token as PTok
14parseCmd i = runParser pCmd i "(input)"
16cmd :: [String] -> IParser ()
17cmd xs = do lchar ':'; docmd xs
18 where docmd [] = fail "No such command"
19 docmd (x:xs) = try (discard (symbol x)) <|> docmd xs
21pCmd :: IParser Command
22pCmd = try (do cmd ["q", "quit"]; return Quit)
23 <|> try (do cmd ["h", "?", "help"]; return Help)
24 <|> try (do cmd ["ttshell"]; return TTShell)
25 <|> do t <- pFullExpr defaultSyntax; return (Eval t)
26 <|> do eof; return NOP
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list