Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
3108accd
Commit
3108accd
authored
Aug 24, 2011
by
dterei
Browse files
Formatting fixes
parent
3d886b2d
Changes
2
Hide whitespace changes
Inline
Side-by-side
compiler/ghci/Debugger.hs
View file @
3108accd
...
...
@@ -165,13 +165,12 @@ showTerm term = do
expr
=
"show "
++
showSDoc
(
ppr
bname
)
_
<-
GHC
.
setSessionDynFlags
dflags
{
log_action
=
noop_log
}
txt_
<-
withExtendedLinkEnv
[(
bname
,
val
)]
(
GHC
.
compileExpr
expr
)
(
GHC
.
compileExpr
expr
)
let
myprec
=
10
-- application precedence. TODO Infix constructors
let
txt
=
unsafeCoerce
#
txt_
if
not
(
null
txt
)
then
return
$
Just
$
cparen
(
prec
>=
myprec
&&
needsParens
txt
)
(
text
txt
)
return
$
Just
$
cparen
(
prec
>=
myprec
&&
needsParens
txt
)
(
text
txt
)
else
return
Nothing
`
gfinally
`
do
setSession
hsc_env
...
...
compiler/ghci/RtClosureInspect.hs
View file @
3108accd
...
...
@@ -337,7 +337,8 @@ pprTermM y p t = pprDeeper `liftM` ppr_termM y p t
ppr_termM
y
p
Term
{
dc
=
Left
dc_tag
,
subTerms
=
tt
}
=
do
tt_docs
<-
mapM
(
y
app_prec
)
tt
return
$
cparen
(
not
(
null
tt
)
&&
p
>=
app_prec
)
(
text
dc_tag
<+>
pprDeeperList
fsep
tt_docs
)
return
$
cparen
(
not
(
null
tt
)
&&
p
>=
app_prec
)
(
text
dc_tag
<+>
pprDeeperList
fsep
tt_docs
)
ppr_termM
y
p
Term
{
dc
=
Right
dc
,
subTerms
=
tt
}
{- | dataConIsInfix dc, (t1:t2:tt') <- tt --TODO fixity
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment