projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Outputable.blankLine and use it
[ghc-hetmet.git]
/
compiler
/
coreSyn
/
PprCore.lhs
diff --git
a/compiler/coreSyn/PprCore.lhs
b/compiler/coreSyn/PprCore.lhs
index
1504ab9
..
84bf868
100644
(file)
--- a/
compiler/coreSyn/PprCore.lhs
+++ b/
compiler/coreSyn/PprCore.lhs
@@
-27,6
+27,7
@@
import DataCon
import TyCon
import Type
import Coercion
import TyCon
import Type
import Coercion
+import StaticFlags
import BasicTypes
import Util
import Outputable
import BasicTypes
import Util
import Outputable
@@
-70,13
+71,16
@@
pprTopBinds binds = vcat (map pprTopBind binds)
pprTopBind :: OutputableBndr a => Bind a -> SDoc
pprTopBind (NonRec binder expr)
pprTopBind :: OutputableBndr a => Bind a -> SDoc
pprTopBind (NonRec binder expr)
- = ppr_binding (binder,expr) $$ text ""
+ = ppr_binding (binder,expr) $$ blankLine
-pprTopBind (Rec binds)
+pprTopBind (Rec [])
+ = ptext (sLit "Rec { }")
+pprTopBind (Rec (b:bs))
= vcat [ptext (sLit "Rec {"),
= vcat [ptext (sLit "Rec {"),
- vcat (map ppr_binding binds),
+ ppr_binding b,
+ vcat [blankLine $$ ppr_binding b | b <- bs],
ptext (sLit "end Rec }"),
ptext (sLit "end Rec }"),
- text ""]
+ blankLine]
\end{code}
\begin{code}
\end{code}
\begin{code}
@@
-114,9
+118,11
@@
ppr_expr _ (Lit lit) = ppr lit
ppr_expr add_par (Cast expr co)
= add_par $
sep [pprParendExpr expr,
ppr_expr add_par (Cast expr co)
= add_par $
sep [pprParendExpr expr,
- ptext (sLit "`cast`") <+> parens (pprCo co)]
+ ptext (sLit "`cast`") <+> pprCo co]
where
where
- pprCo co = sep [ppr co, dcolon <+> ppr (coercionKindPredTy co)]
+ pprCo co | opt_SuppressCoercions = ptext (sLit "...")
+ | otherwise = parens
+ $ sep [ppr co, dcolon <+> ppr (coercionKindPredTy co)]
ppr_expr add_par expr@(Lam _ _)
ppr_expr add_par expr@(Lam _ _)
@@
-310,7
+316,7
@@
pprIdBndrInfo info
dmd_info = newDemandInfo info
lbv_info = lbvarInfo info
dmd_info = newDemandInfo info
lbv_info = lbvarInfo info
- no_info = isAlwaysActive prag_info && isNoOcc occ_info &&
+ no_info = isDefaultInlinePragma prag_info && isNoOcc occ_info &&
(case dmd_info of { Nothing -> True; Just d -> isTop d }) &&
hasNoLBVarInfo lbv_info
(case dmd_info of { Nothing -> True; Just d -> isTop d }) &&
hasNoLBVarInfo lbv_info