1module Idris.Help (CmdArg(..), help, extraHelp) where
3data CmdArg = ExprArg -- ^ The command takes an expression
4 | NameArg -- ^ The command takes a name
5 | FileArg -- ^ The command takes a file
6 | ModuleArg -- ^ The command takes a module name
7 | OptionArg -- ^ The command takes an option
8 | MetaVarArg -- ^ The command takes a metavariable
9 | ColourArg -- ^ The command is the colour-setting command
10 | NoArg -- ^ No completion (yet!?)
11 | SpecialHeaderArg -- ^ do not use
12 | ConsoleWidthArg -- ^ The width of the console
14instance Show CmdArg where
15 show ExprArg = "<expr>"
16 show NameArg = "<name>"
17 show FileArg = "<filename>"
18 show ModuleArg = "<module>"
19 show OptionArg = "<option>"
20 show MetaVarArg = "<metavar>"
21 show ColourArg = "<option>"
23 show SpecialHeaderArg = "Arguments"
24 show ConsoleWidthArg = "auto|infinite|<number>"
26help :: [([String], CmdArg, String)]
28 [ (["<expr>"], NoArg, "Evaluate an expression"),
29 ([":t"], ExprArg, "Check the type of an expression"),
30 ([":miss", ":missing"], NameArg, "Show missing clauses"),
31 ([":doc"], NameArg, "Show internal documentation"),
32 ([":apropos"], NoArg, "Search names, types, and documentation"),
33 ([":i", ":info"], NameArg, "Display information about a type class"),
34 ([":total"], NameArg, "Check the totality of a name"),
35 ([":r",":reload"], NoArg, "Reload current file"),
36 ([":l",":load"], FileArg, "Load a new file"),
37 ([":cd"], FileArg, "Change working directory"),
38 ([":m",":module"], ModuleArg, "Import an extra module"), -- NOTE: dragons
39 ([":e",":edit"], NoArg, "Edit current file using $EDITOR or $VISUAL"),
40 ([":m",":metavars"], MetaVarArg, "Show remaining proof obligations (metavariables)"),
41 ([":p",":prove"], MetaVarArg, "Prove a metavariable"),
42 ([":a",":addproof"], NameArg, "Add proof to source file"),
43 ([":rmproof"], NameArg, "Remove proof from proof stack"),
44 ([":showproof"], NameArg, "Show proof"),
45 ([":proofs"], NoArg, "Show available proofs"),
46 ([":x"], ExprArg, "Execute IO actions resulting from an expression using the interpreter"),
47 ([":c",":compile"], FileArg, "Compile to an executable <filename>"),
48 ([":js", ":javascript"], FileArg, "Compile to JavaScript <filename>"),
49 ([":exec",":execute"], NoArg, "Compile to an executable and run"),
50 ([":dynamic"], FileArg, "Dynamically load a C library (similar to %dynamic)"),
51 ([":dynamic"], NoArg, "List dynamically loaded C libraries"),
52 ([":?",":h",":help"], NoArg, "Display this help text"),
53 ([":set"], OptionArg, "Set an option (errorcontext, showimplicits)"),
54 ([":unset"], OptionArg, "Unset an option"),
55 ([":colour", ":color"], ColourArg, "Turn REPL colours on or off; set a specific colour"),
56 ([":consolewidth"], ConsoleWidthArg, "Set the width of the console"),
57 ([":q",":quit"], NoArg, "Exit the Idris system")
60-- | Use these for completion, but don't show them in :help
61extraHelp ::[([String], CmdArg, String)]
63 [ ([":casesplit", ":cs"], NoArg, ":cs <line> <name> splits the pattern variable on the line")
64 , ([":casesplit!", ":cs!"], NoArg, ":cs! <line> <name> destructively splits the pattern variable on the line")
65 , ([":addclause", ":ac"], NoArg, ":ac <line> <name> adds a clause for the definition of the name on the line")
66 , ([":addclause!", ":ac!"], NoArg, ":ac! <line> <name> destructively adds a clause for the definition of the name on the line")
67 , ([":addmissing", ":am"], NoArg, ":am <line> <name> adds all missing pattern matches for the name on the line")
68 , ([":addmissing!", ":am!"], NoArg, ":am! <line> <name> destructively adds all missing pattern matches for the name on the line")
69 , ([":makewith", ":mw"], NoArg, ":mw <line> <name> adds a with clause for the definition of the name on the line")
70 , ([":makewith!", ":mw!"], NoArg, ":mw! <line> <name> destructively adds a with clause for the definition of the name on the line")
71 , ([":proofsearch", ":ps"], NoArg, ":ps <line> <name> <names> does proof search for name on line, with names as hints")
72 , ([":proofsearch!", ":ps!"], NoArg, ":ps! <line> <name> <names> destructively does proof search for name on line, with names as hints")
73 , ([":addproofclause", ":apc"], NoArg, ":apc <line> <name> adds a pattern-matching proof clause to name on line")
74 , ([":addproofclause!", ":apc!"], NoArg, ":apc! <line> <name> destructively adds a pattern-matching proof clause to name on line")
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