Use haskeline, rather than editline, for line editing in ghci
:steplocal and :stepmodule should not polute trace history
#2973: we should virtualise the CWD inside the GHC API, not in the client The problem is that we install the client's CWD before calling runStmt, but runStmt has to load modules before running the code. We need to install the CWD just before running the code instead, which means it has to be done inside runStmt (and resume).
Make 'gblock' and 'gunblock' part of 'ExceptionMonad'. This way the default implementations of 'gbracket' and 'gfinally' just work. MERGE TO 6.10
Use 'GhcMonad' in ghci/GhciMonad.
Follow changes in the base library TopHandler now uses the new extensible exceptions module, so we need to interact with it using the new types.
Follow extensible exception changes
Fix Haddock errors.
Move -fno-cse flags from Makefile into pragmas These are needed for GLOBAL_VAR's to work properly
FIX #1970: ghci -hide-all-packages should work
Tiny code tweak in the definition of io in GhciMonad; no semantic change
Make GhciMonad warning-free
don't turn off stdin/stdout buffering after loading a module with ghc -e (#2228)
Virtualize the cwd in GHCi This fixes the issue where :list would stop working if the program being debugged side-effected the working directory, and should prevent other similar issues
FIX #2049, another problem with the module context on :reload The previous attempt to fix this (#1873, #1360) left a problem that occurred when the first :load of the program failed (#2049). Now I've implemented a different strategy: between :loads, we remember all the :module commands, and just replay them after a :reload. This is in addition to remembering all the package modules added with :module, which is orthogonal. This approach is simpler than the previous one, and seems to do the right thing in all the cases I could think of. Let's hope this is the last bug in this series...
Use command-dependent word break characters for tab completion in ghci. Fixes bug #998.
MERGED: Make ":" in GHCi repeat the last command Ian Lynagh <igloo@earth.li>**20071124231857 It used to be a synonym for ":r" in 6.6.1, but this wasn't documented or known about by the developers. In 6.8.1 it was accidentally broken. This patch brings it back, but as "repeat the last command", similar to pressing enter in gdb. This is almost as good for people who want it to reload, and means that it can also be used to repeat commands like :step.
Attempt at fixing #1873, #1360 I think I figured out a reasonable way to manage the GHCi context, comments welcome. Rule 1: external package modules in the context are persistent. That is, when you say 'import Data.Maybe' it survives over :load, :add, :reload and :cd. Rule 2: :load and :add remove all home-package modules from the context and add the rightmost target, as a *-module if possible. This is as before, and makes sense for :load because we're starting a new program; the old home-package modules don't make sense any more. For :add, it usually does what you want, because the new target will become the context. Rule 3: any modules from the context that fail to load during a :reload are remembered, and re-added to the context at the next successful :reload. Claus' suggestion about adding the "remembered" modules to the prompt prefixed with a ! is implemented but commented out. I couldn't decide whether it was useful or confusing. One difference that people might notice is that after a :reload where there were errors, GHCi would previously dump you in the most recent module that it loaded. Now it dumps you in whatever subset of the current context still makes sense, and in the common case that will probably be {Prelude}.
Try to manage the size of the text rendered for ':show bindings'
Fix CodingStyle#Warnings URLs