@@ -16,6 +16,7 @@ import Idris.Primitives
1616import Idris.Coverage
1717import Idris.UnusedArgs
1818import Idris.Docs
19+import Idris.Help
1920import Idris.Completion
2021
2122import Paths_idris
@@ -418,8 +419,9 @@ showTotalN i n = case lookupTotal n (tt_ctxt i) of
418419displayHelp = let vstr = showVersion version in
419420 "\nIdris version " ++ vstr ++ "\n" ++
420421 "--------------" ++ map (\x -> '-') vstr ++ "\n\n" ++
422+ concatMap cmdInfo helphead ++
421423 concatMap cmdInfo help
422− where cmdInfo (cmds, args, text) = " " ++ col 16 12 (showSep " " cmds) args text
424+ where cmdInfo (cmds, args, text, _) = " " ++ col 16 12 (showSep " " cmds) args text
423425 col c1 c2 l m r =
424426 l ++ take (c1 - length l) (repeat ' ') ++
425427 m ++ take (c2 - length m) (repeat ' ') ++ r ++ "\n"
@@ -469,31 +471,9 @@ parseArgs ("--dumpcases":n:ns) = DumpCases n : (parseArgs ns)
469471parseArgs ("--target":n:ns) = UseTarget (parseTarget n) : (parseArgs ns)
470472parseArgs (n:ns) = Filename n : (parseArgs ns)
471473
472−help =
473− [ (["Command"], "Arguments", "Purpose"),
474− ([""], "", ""),
475− (["<expr>"], "", "Evaluate an expression"),
476− ([":t"], "<expr>", "Check the type of an expression"),
477− ([":miss", ":missing"], "<name>", "Show missing clauses"),
478− ([":i", ":info"], "<name>", "Display information about a type class"),
479− ([":total"], "<name>", "Check the totality of a name"),
480− ([":r",":reload"], "", "Reload current file"),
481− ([":l",":load"], "<filename>", "Load a new file"),
482− ([":m",":module"], "<module>", "Import an extra module"),
483− ([":e",":edit"], "", "Edit current file using $EDITOR or $VISUAL"),
484− ([":m",":metavars"], "", "Show remaining proof obligations (metavariables)"),
485− ([":p",":prove"], "<name>", "Prove a metavariable"),
486− ([":a",":addproof"], "<name>", "Add proof to source file"),
487− ([":rmproof"], "<name>", "Remove proof from proof stack"),
488− ([":showproof"], "<name>", "Show proof"),
489− ([":proofs"], "", "Show available proofs"),
490− ([":c",":compile"], "<filename>", "Compile to an executable <filename>"),
491− ([":js", ":javascript"], "<filename>", "Compile to JavaScript <filename>"),
492− ([":exec",":execute"], "", "Compile to an executable and run"),
493− ([":?",":h",":help"], "", "Display this help text"),
494− ([":set"], "<option>", "Set an option (errorcontext, showimplicits)"),
495− ([":unset"], "<option>", "Unset an option"),
496− ([":q",":quit"], "", "Exit the Idris system")
474+helphead =
475+ [ (["Command"], "Arguments", "Purpose", ""),
476+ ([""], "", "", "")
497477 ]
498478
499479