@@ -11,6 +11,10 @@ data CmdArg = ExprArg -- ^ The command takes an expression
1111 | NoArg -- ^ No completion (yet!?)
1212 | SpecialHeaderArg -- ^ do not use
1313 | ConsoleWidthArg -- ^ The width of the console
14+ | DeclArg -- ^ An Idris declaration, as might be contained in a file
15+ | ManyArgs CmdArg -- ^ Zero or more of one kind of argument
16+ | OptionalArg CmdArg -- ^ Zero or one of one kind of argument
17+ | SeqArgs CmdArg CmdArg -- ^ One kind of argument followed by another
1418
1519instance Show CmdArg where
1620 show ExprArg = "<expr>"
@@ -24,6 +28,10 @@ instance Show CmdArg where
2428 show NoArg = ""
2529 show SpecialHeaderArg = "Arguments"
2630 show ConsoleWidthArg = "auto|infinite|<number>"
31+ show DeclArg = "<top-level declaration>"
32+ show (ManyArgs a) = "(" ++ show a ++ ")..."
33+ show (OptionalArg a) = "[" ++ show a ++ "]"
34+ show (SeqArgs a b) = show a ++ " " ++ show b
2735
2836help :: [([String], CmdArg, String)]
2937help =
@@ -59,7 +67,9 @@ help =
5967 ([":colour", ":color"], ColourArg, "Turn REPL colours on or off; set a specific colour"),
6068 ([":consolewidth"], ConsoleWidthArg, "Set the width of the console"),
6169 ([":q",":quit"], NoArg, "Exit the Idris system"),
62− ([":w", ":warranty"], NoArg, "Displays warranty information")
70+ ([":w", ":warranty"], NoArg, "Displays warranty information"),
71+ ([":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")
6373 ]
6474
6575-- | Use these for completion, but don't show them in :help