X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FInteractiveUI.hs;h=b5af439d640173a3ae49fc437883ac9ee10c059a;hb=a6156829d4e671c5385769ccc7675e644591525d;hp=298d697702e9c4d7a68f212be0db9f8f36285bd7;hpb=8bc615fdb45b8e3f2f3ef2167bbb379bf619aab2;p=ghc-hetmet.git diff --git a/compiler/ghci/InteractiveUI.hs b/compiler/ghci/InteractiveUI.hs index 298d697..b5af439 100644 --- a/compiler/ghci/InteractiveUI.hs +++ b/compiler/ghci/InteractiveUI.hs @@ -85,6 +85,7 @@ import System.Directory import System.IO import System.IO.Error as IO import Data.Char +import Data.Dynamic import Control.Monad as Monad import Foreign.StablePtr ( newStablePtr ) @@ -113,7 +114,12 @@ builtin_commands :: [Command] builtin_commands = [ ("add", tlC$ keepGoingPaths addModule, False, completeFilename), ("browse", keepGoing browseCmd, False, completeModule), - ("cd", keepGoing changeDirectory, False, completeFilename), +#ifdef DEBUGGER + -- I think that :c should mean :continue rather than :cd, makes more sense + -- (pepe 01.11.07) + ("continue", const(bkptOptions "continue"), False, completeNone), +#endif + ("cd", tlC$ keepGoing changeDirectory, False, completeFilename), ("def", keepGoing defineMacro, False, completeIdentifier), ("e", keepGoing editFile, False, completeFilename), -- Hugs users are accustomed to :e, so make sure it doesn't overlap @@ -131,8 +137,11 @@ builtin_commands = [ ("etags", keepGoing createETagsFileCmd, False, completeFilename), ("ctags", keepGoing createCTagsFileCmd, False, completeFilename), ("type", keepGoing typeOfExpr, False, completeIdentifier), -#if defined(GHCI) - ("breakpoint",keepGoing bkptOptions, False, completeBkpt), +#if defined(DEBUGGER) + ("print", keepGoing (pprintClosureCommand True False), False, completeIdentifier), + ("sprint", keepGoing (pprintClosureCommand False False),False, completeIdentifier), + ("force", keepGoing (pprintClosureCommand False True), False, completeIdentifier), + ("breakpoint",bkptOptions, False, completeBkpt), #endif ("kind", keepGoing kindOfType, False, completeIdentifier), ("unset", keepGoing unsetOptions, True, completeSetOptions), @@ -143,7 +152,7 @@ builtin_commands = [ keepGoing :: (String -> GHCi ()) -> (String -> GHCi Bool) keepGoing a str = a str >> return False --- tlC: Top Level Command +-- tlC: Top Level Command, not allowed in inferior sessions tlC :: (String -> GHCi Bool) -> (String -> GHCi Bool) tlC a str = do top_level <- isTopLevel @@ -165,11 +174,14 @@ helpText = " :breakpoint