X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FInteractiveUI.hs;h=3e528d00302729721661e16e81c3faa2ab8a0242;hb=6d075f13b503ad7b1255911e98f4837a08607ed7;hp=a1aaa6ac00b7a97975326b1439a8904ba08d5f34;hpb=3a0ddd1f757d1c44c98227f2b2587f1b1949c897;p=ghc-hetmet.git diff --git a/compiler/ghci/InteractiveUI.hs b/compiler/ghci/InteractiveUI.hs index a1aaa6a..3e528d0 100644 --- a/compiler/ghci/InteractiveUI.hs +++ b/compiler/ghci/InteractiveUI.hs @@ -79,17 +79,12 @@ import Control.Monad as Monad import Foreign.StablePtr ( newStablePtr ) import GHC.Exts ( unsafeCoerce# ) -import GHC.IOBase ( IOErrorType(InvalidArgument), IO(IO) ) +import GHC.IOBase ( IOErrorType(InvalidArgument) ) import Data.IORef ( IORef, readIORef, writeIORef ) import System.Posix.Internals ( setNonBlockingFD ) --- these are needed by the new ghci debugger -import ByteCodeLink (HValue) -import ByteCodeInstr (BreakInfo (..)) -import BreakArray - ----------------------------------------------------------------------------- ghciWelcomeMsg = @@ -109,14 +104,14 @@ builtin_commands = [ -- Hugs users are accustomed to :e, so make sure it doesn't overlap ("?", keepGoing help, False, completeNone), ("add", keepGoingPaths addModule, False, completeFilename), - ("break", breakCmd, False, completeNone), + ("break", breakCmd, False, completeIdentifier), ("browse", keepGoing browseCmd, False, completeModule), ("cd", keepGoing changeDirectory, False, completeFilename), ("check", keepGoing checkModule, False, completeHomeModule), - ("continue", continueCmd, False, completeNone), + ("continue", continueCmd, False, completeNone), ("ctags", keepGoing createCTagsFileCmd, False, completeFilename), ("def", keepGoing defineMacro, False, completeIdentifier), - ("delete", deleteCmd, False, completeNone), + ("delete", deleteCmd, False, completeNone), ("e", keepGoing editFile, False, completeFilename), ("edit", keepGoing editFile, False, completeFilename), ("etags", keepGoing createETagsFileCmd, False, completeFilename), @@ -124,7 +119,7 @@ builtin_commands = [ ("help", keepGoing help, False, completeNone), ("info", keepGoing info, False, completeIdentifier), ("kind", keepGoing kindOfType, False, completeIdentifier), - ("load", keepGoingPaths loadModule_,False, completeHomeModuleOrFile), + ("load", keepGoingPaths loadModule_, False, completeHomeModuleOrFile), ("module", keepGoing setContext, False, completeModule), ("main", keepGoing runMain, False, completeIdentifier), ("print", keepGoing (pprintClosureCommand True False), False, completeIdentifier), @@ -133,7 +128,7 @@ builtin_commands = [ ("set", keepGoing setCmd, True, completeSetOptions), ("show", keepGoing showCmd, False, completeNone), ("sprint", keepGoing (pprintClosureCommand False False),False, completeIdentifier), - ("step", stepCmd, False, completeNone), + ("step", stepCmd, False, completeIdentifier), ("type", keepGoing typeOfExpr, False, completeIdentifier), ("undef", keepGoing undefineMacro, False, completeMacro), ("unset", keepGoing unsetOptions, True, completeSetOptions) @@ -147,24 +142,32 @@ keepGoingPaths a str = a (toArgs str) >> return False shortHelpText = "use :? for help.\n" --- NOTE: spaces at the end of each line to workaround CPP/string gap bug. helpText = " Commands available from the prompt:\n" ++ "\n" ++ " evaluate/run \n" ++ " :add ... add module(s) to the current target set\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" ++ + " :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" ++ - " :print [ ...] prints a value without forcing its computation\n" ++ - " :sprint [ ...] simplified version of :print\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" ++ "\n" ++ " :set