projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
848d28c
)
Improve presentation of :print output
author
Pepe Iborra
<mnislaih@gmail.com>
Sun, 21 Jan 2007 11:06:10 +0000
(11:06 +0000)
committer
Pepe Iborra
<mnislaih@gmail.com>
Sun, 21 Jan 2007 11:06:10 +0000
(11:06 +0000)
compiler/ghci/Debugger.hs
patch
|
blob
|
history
diff --git
a/compiler/ghci/Debugger.hs
b/compiler/ghci/Debugger.hs
index
125d634
..
cb2a9ba
100644
(file)
--- a/
compiler/ghci/Debugger.hs
+++ b/
compiler/ghci/Debugger.hs
@@
-34,6
+34,7
@@
import GhciMonad
import PackageConfig
import Outputable
import PackageConfig
import Outputable
+import Pretty ( Mode(..), showDocWith )
import ErrUtils
import FastString
import SrcLoc
import ErrUtils
import FastString
import SrcLoc
@@
-83,7
+84,9
@@
pprintClosureCommand bindThings force str = do
else bindSuspensions cms term
showterm <- pprTerm cms term'
unqual <- GHC.getPrintUnqual cms
else bindSuspensions cms term
showterm <- pprTerm cms term'
unqual <- GHC.getPrintUnqual cms
- (putStrLn . showSDocForUser unqual) (ppr id <+> char '=' <+> showterm)
+ let showSDocForUserOneLine unqual doc =
+ showDocWith LeftMode (doc (mkErrStyle unqual))
+ (putStrLn . showSDocForUserOneLine unqual) (ppr id <+> char '=' <+> showterm)
-- Before leaving, we compare the type obtained to see if it's more specific
-- Note how we need the Unknown-clear type returned by obtainTerm
let Just reconstructedType = termType term
-- Before leaving, we compare the type obtained to see if it's more specific
-- Note how we need the Unknown-clear type returned by obtainTerm
let Just reconstructedType = termType term