projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
MERGED: Make ":" in GHCi repeat the last command
[ghc-hetmet.git]
/
compiler
/
ghci
/
GhciMonad.hs
diff --git
a/compiler/ghci/GhciMonad.hs
b/compiler/ghci/GhciMonad.hs
index
2ccde55
..
4e8e65f
100644
(file)
--- a/
compiler/ghci/GhciMonad.hs
+++ b/
compiler/ghci/GhciMonad.hs
@@
-46,6
+46,8
@@
import GHC.Exts
-----------------------------------------------------------------------------
-- GHCi monad
-----------------------------------------------------------------------------
-- GHCi monad
+type Command = (String, String -> GHCi Bool, Bool, String -> IO [String])
+
data GHCiState = GHCiState
{
progname :: String,
data GHCiState = GHCiState
{
progname :: String,
@@
-62,6
+64,9
@@
data GHCiState = GHCiState
-- tickarrays caches the TickArray for loaded modules,
-- so that we don't rebuild it each time the user sets
-- a breakpoint.
-- tickarrays caches the TickArray for loaded modules,
-- so that we don't rebuild it each time the user sets
-- a breakpoint.
+ -- ":" at the GHCi prompt repeats the last command, so we
+ -- remember is here:
+ last_command :: Maybe Command,
cmdqueue :: [String],
remembered_ctx :: Maybe ([Module],[Module])
-- modules we want to add to the context, but can't
cmdqueue :: [String],
remembered_ctx :: Maybe ([Module],[Module])
-- modules we want to add to the context, but can't