projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Attempt at fixing #1873, #1360
[ghc-hetmet.git]
/
compiler
/
ghci
/
GhciMonad.hs
diff --git
a/compiler/ghci/GhciMonad.hs
b/compiler/ghci/GhciMonad.hs
index
06de9e9
..
2ccde55
100644
(file)
--- a/
compiler/ghci/GhciMonad.hs
+++ b/
compiler/ghci/GhciMonad.hs
@@
-10,7
+10,7
@@
-- The above warning supression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and fix
-- any warnings in the module. See
-- The above warning supression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and fix
-- any warnings in the module. See
--- http://hackage.haskell.org/trac/ghc/wiki/CodingStyle#Warnings
+-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
-- for details
module GhciMonad where
-- for details
module GhciMonad where
@@
-18,7
+18,7
@@
module GhciMonad where
#include "HsVersions.h"
import qualified GHC
#include "HsVersions.h"
import qualified GHC
-import Outputable hiding (printForUser)
+import Outputable hiding (printForUser, printForUserPartWay)
import qualified Outputable
import Panic hiding (showException)
import Util
import qualified Outputable
import Panic hiding (showException)
import Util
@@
-27,6
+27,7
@@
import HscTypes
import SrcLoc
import Module
import ObjLink
import SrcLoc
import Module
import ObjLink
+import StaticFlags
import Data.Maybe
import Numeric
import Data.Maybe
import Numeric
@@
-61,7
+62,10
@@
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.
- cmdqueue :: [String]
+ cmdqueue :: [String],
+ remembered_ctx :: Maybe ([Module],[Module])
+ -- modules we want to add to the context, but can't
+ -- because they currently have errors. Set by :reload.
}
type TickArray = Array Int [(BreakIndex,SrcSpan)]
}
type TickArray = Array Int [(BreakIndex,SrcSpan)]
@@
-169,6
+173,12
@@
printForUser doc = do
unqual <- io (GHC.getPrintUnqual session)
io $ Outputable.printForUser stdout unqual doc
unqual <- io (GHC.getPrintUnqual session)
io $ Outputable.printForUser stdout unqual doc
+printForUserPartWay :: SDoc -> GHCi ()
+printForUserPartWay doc = do
+ session <- getSession
+ unqual <- io (GHC.getPrintUnqual session)
+ io $ Outputable.printForUserPartWay stdout opt_PprUserLength unqual doc
+
-- --------------------------------------------------------------------------
-- timing & statistics
-- --------------------------------------------------------------------------
-- timing & statistics