pprCoreExpr, pprParendExpr,
pprCoreBinding, pprCoreBindings, pprIdBndr,
pprCoreBinding, pprCoreBindings, pprCoreAlt,
- pprCoreRules, pprCoreRule, pprIdCoreRule
+ pprIdRules, pprCoreRule
) where
#include "HsVersions.h"
import CostCentre ( pprCostCentreCore )
import Id ( Id, idType, isDataConId_maybe, idLBVarInfo, idArity,
idInfo, idInlinePragma, idOccInfo,
-#ifdef DEBUG
+#ifdef OLD_STRICTNESS
idDemandInfo,
#endif
globalIdDetails, isGlobalId, isExportedId,
workerInfo, ppWorkerInfo,
tyGenInfo, ppTyGenInfo,
newStrictnessInfo,
-#ifdef DEBUG
+#ifdef OLD_STRICTNESS
cprInfo, ppCprInfo,
strictnessInfo,
#endif
(megaSeqIdInfo (idInfo id) `seq`
-- Useful for poking on black holes
ifPprDebug (ppr (idInlinePragma id) <+> ppr (idOccInfo id) <+>
-#ifdef DEBUG
+#ifdef OLD_STRICTNESS
ppr (idDemandInfo id) <+>
#endif
ppr (idNewDemandInfo id) <+>
= hsep [ ppArityInfo a,
ppTyGenInfo g,
ppWorkerInfo (workerInfo info),
-#ifdef DEBUG
+#ifdef OLD_STRICTNESS
ppStrictnessInfo s,
ppCprInfo m,
#endif
ppr (newStrictnessInfo info),
- pprCoreRules b p
+ vcat (map (pprCoreRule (ppr b)) (rulesRules p))
-- Inline pragma, occ, demand, lbvar info
-- printed out with all binders (when debug is on);
-- see PprCore.pprIdBndr
where
a = arityInfo info
g = tyGenInfo info
-#ifdef DEBUG
+#ifdef OLD_STRICTNESS
s = strictnessInfo info
m = cprInfo info
#endif
\begin{code}
-pprCoreRules :: Id -> CoreRules -> SDoc
-pprCoreRules var (Rules rules _) = vcat (map (pprCoreRule (ppr var)) rules)
+pprIdRules :: [IdCoreRule] -> SDoc
+pprIdRules rules = vcat (map pprIdRule rules)
-pprIdCoreRule :: IdCoreRule -> SDoc
-pprIdCoreRule (id,rule) = pprCoreRule (ppr id) rule
+pprIdRule :: IdCoreRule -> SDoc
+pprIdRule (id,rule) = pprCoreRule (ppr id) rule
pprCoreRule :: SDoc -> CoreRule -> SDoc
pprCoreRule pp_fn (BuiltinRule name _)