on master help sign in
Merge pull request #1670 from jfdm/fix/foc/pprint
21e77f3Edwin Brady
src/Idris/Help.hs+4−1
@@ -4,6 +4,7 @@ data CmdArg = ExprArg -- ^ The command takes an expression
4 | NameArg -- ^ The command takes a name
4 | NameArg -- ^ The command takes a name
5 | FileArg -- ^ The command takes a file
5 | FileArg -- ^ The command takes a file
6 | ModuleArg -- ^ The command takes a module name
6 | ModuleArg -- ^ The command takes a module name
7+ | NumberArg -- ^ The command takes a number
7 | NamespaceArg -- ^ The command takes a namespace name
8 | NamespaceArg -- ^ The command takes a namespace name
8 | OptionArg -- ^ The command takes an option
9 | OptionArg -- ^ The command takes an option
9 | MetaVarArg -- ^ The command takes a metavariable
10 | MetaVarArg -- ^ The command takes a metavariable
@@ -21,6 +22,7 @@ instance Show CmdArg where
21 show NameArg = "<name>"
22 show NameArg = "<name>"
22 show FileArg = "<filename>"
23 show FileArg = "<filename>"
23 show ModuleArg = "<module>"
24 show ModuleArg = "<module>"
25+ show NumberArg = "<number>"
24 show NamespaceArg = "<namespace>"
26 show NamespaceArg = "<namespace>"
25 show OptionArg = "<option>"
27 show OptionArg = "<option>"
26 show MetaVarArg = "<metavar>"
28 show MetaVarArg = "<metavar>"
@@ -70,7 +72,8 @@ help =
70 ([":w", ":warranty"], NoArg, "Displays warranty information"),
72 ([":w", ":warranty"], NoArg, "Displays warranty information"),
71 ([":let"], ManyArgs DeclArg, "Evaluate a declaration, such as a function definition, instance implementation, or fixity declaration"),
73 ([":let"], ManyArgs DeclArg, "Evaluate a declaration, such as a function definition, instance implementation, or fixity declaration"),
72 ([":undefine",":unlet"], ManyArgs NameArg, "Remove the listed repl definitions, or all repl definitions if no names given"),
74 ([":undefine",":unlet"], ManyArgs NameArg, "Remove the listed repl definitions, or all repl definitions if no names given"),
73− ([":printdef"], NameArg, "Show the definition of a function")
75+ ([":printdef"], NameArg, "Show the definition of a function"),
76+ ([":pp", ":pprint"], (SeqArgs OptionArg (SeqArgs NumberArg NameArg)), "Pretty prints an Idris function in either LaTeX or HTML and for a specified width.")
74 ]
77 ]
75
78
76-- | Use these for completion, but don't show them in :help
79-- | Use these for completion, but don't show them in :help