X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Fghci%2FInteractiveUI.hs;h=a295245a8b469022389301eff5aadca72a90ecd1;hb=cdfbaf4f6d2bafdd7e661eb44c3a4c99cae603a0;hp=b9b82ace1832e61247d695e9f0af20e5689a5e12;hpb=8b08c15b8ace5a76e341939081fbb6ad2736ddd1;p=ghc-hetmet.git diff --git a/compiler/ghci/InteractiveUI.hs b/compiler/ghci/InteractiveUI.hs index b9b82ac..a295245 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 @@ -135,7 +141,7 @@ builtin_commands = [ ("print", keepGoing (pprintClosureCommand True False), False, completeIdentifier), ("sprint", keepGoing (pprintClosureCommand False False),False, completeIdentifier), ("force", keepGoing (pprintClosureCommand False True), False, completeIdentifier), - ("breakpoint",keepGoing bkptOptions, False, completeBkpt), + ("breakpoint",bkptOptions, False, completeBkpt), #endif ("kind", keepGoing kindOfType, False, completeIdentifier), ("unset", keepGoing unsetOptions, True, completeSetOptions), @@ -146,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 @@ -168,13 +174,14 @@ helpText = " :breakpoint