X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fghci%2FInteractiveUI.hs;h=4fb92692d130e1ca66a9555278dea53649cd8070;hp=9b0bdf956465f3a8de4444447fdac8a989781dde;hb=622e67a80631c7528ebfa51e9a863c27e74f1c6b;hpb=10406dfbd1a90e0ca813cc2809719263642d9a97 diff --git a/compiler/ghci/InteractiveUI.hs b/compiler/ghci/InteractiveUI.hs index 9b0bdf9..4fb9269 100644 --- a/compiler/ghci/InteractiveUI.hs +++ b/compiler/ghci/InteractiveUI.hs @@ -74,6 +74,7 @@ import Data.Char import Data.Dynamic import Data.Array import Control.Monad as Monad +import Text.Printf import Foreign.StablePtr ( newStablePtr ) import GHC.Exts ( unsafeCoerce# ) @@ -108,7 +109,8 @@ builtin_commands = [ ("browse", keepGoing browseCmd, False, completeModule), ("cd", keepGoing changeDirectory, False, completeFilename), ("check", keepGoing checkModule, False, completeHomeModule), - ("continue", continueCmd, False, completeNone), + ("continue", keepGoing continueCmd, False, completeNone), + ("cmd", keepGoing cmdCmd, False, completeIdentifier), ("ctags", keepGoing createCTagsFileCmd, False, completeFilename), ("def", keepGoing defineMacro, False, completeIdentifier), ("delete", keepGoing deleteCmd, False, completeNone), @@ -131,9 +133,9 @@ builtin_commands = [ ("set", keepGoing setCmd, True, completeSetOptions), ("show", keepGoing showCmd, False, completeNone), ("sprint", keepGoing sprintCmd, False, completeIdentifier), - ("step", stepCmd, False, completeIdentifier), + ("step", keepGoing stepCmd, False, completeIdentifier), ("type", keepGoing typeOfExpr, False, completeIdentifier), - ("trace", traceCmd, False, completeIdentifier), + ("trace", keepGoing traceCmd, False, completeIdentifier), ("undef", keepGoing undefineMacro, False, completeMacro), ("unset", keepGoing unsetOptions, True, completeSetOptions) ] @@ -149,31 +151,49 @@ shortHelpText = "use :? for help.\n" helpText = " Commands available from the prompt:\n" ++ "\n" ++ - " evaluate/run \n" ++ + " evaluate/run \n" ++ " :add ... add module(s) to the current target set\n" ++ - " :abandon at a breakpoint, abandon current computation\n" ++ - " :break [] [] set a breakpoint at the specified location\n" ++ - " :break set a breakpoint on the specified function\n" ++ " :browse [*] display the names defined by \n" ++ " :cd change directory to \n" ++ - " :continue resume after a breakpoint\n" ++ + " :cmd run the commands returned by ::IO String"++ " :ctags [] create tags file for Vi (default: \"tags\")\n" ++ " :def define a command :\n" ++ - " :delete delete the specified breakpoint\n" ++ - " :delete * delete all breakpoints\n" ++ " :edit edit file\n" ++ " :edit edit last module\n" ++ " :etags [] create tags file for Emacs (default: \"TAGS\")\n" ++ --- " :force print , forcing unevaluated parts\n" ++ " :help, :? display this list of commands\n" ++ " :info [ ...] display information about the given names\n" ++ " :kind show the kind of \n" ++ " :load ... load module(s) and their dependents\n" ++ " :module [+/-] [*] ... set the context for expression evaluation\n" ++ " :main [ ...] run the main function with the given arguments\n" ++ - " :print [ ...] prints a value without forcing its computation\n" ++ " :quit exit GHCi\n" ++ " :reload reload the current module set\n" ++ + " :type show the type of \n" ++ + " :undef undefine user-defined command :\n" ++ + " :! run the shell command \n" ++ + "\n" ++ + " -- Commands for debugging:\n" ++ + "\n" ++ + " :abandon at a breakpoint, abandon current computation\n" ++ + " :back go back in the history (after :trace)\n" ++ + " :break [] [] set a breakpoint at the specified location\n" ++ + " :break set a breakpoint on the specified function\n" ++ + " :continue resume after a breakpoint\n" ++ + " :delete delete the specified breakpoint\n" ++ + " :delete * delete all breakpoints\n" ++ + " :force print , forcing unevaluated parts\n" ++ + " :forward go forward in the history (after :back)\n" ++ + " :history [] show the last items in the history (after :trace)\n" ++ + " :print [ ...] prints a value without forcing its computation\n" ++ + " :step single-step after stopping at a breakpoint\n"++ + " :step single-step into \n"++ + " :trace trace after stopping at a breakpoint\n"++ + " :trace trace into (remembers breakpoints for :history)\n"++ + " :sprint [ ...] simplifed version of :print\n" ++ + + "\n" ++ + " -- Commands for changing settings:\n" ++ "\n" ++ " :set