[project @ 2002-03-18 15:23:05 by simonpj]
[ghc-hetmet.git] / ghc / compiler / coreSyn / PprCore.lhs
index b04c186..8639a93 100644 (file)
@@ -12,7 +12,7 @@ module PprCore (
        pprCoreExpr, pprParendExpr,
        pprCoreBinding, pprCoreBindings, pprIdBndr,
        pprCoreBinding, pprCoreBindings, pprCoreAlt,
-       pprCoreRules, pprCoreRule, pprIdCoreRule
+       pprIdRules, pprCoreRule
     ) where
 
 #include "HsVersions.h"
@@ -21,7 +21,7 @@ import CoreSyn
 import CostCentre      ( pprCostCentreCore )
 import Id              ( Id, idType, isDataConId_maybe, idLBVarInfo, idArity,
                          idInfo, idInlinePragma, idOccInfo,
-#ifdef DEBUG
+#ifdef OLD_STRICTNESS
                          idDemandInfo, 
 #endif
                          globalIdDetails, isGlobalId, isExportedId, 
@@ -34,7 +34,7 @@ import IdInfo         ( IdInfo, megaSeqIdInfo,
                          workerInfo, ppWorkerInfo,
                           tyGenInfo, ppTyGenInfo,
                          newStrictnessInfo,
-#ifdef DEBUG
+#ifdef OLD_STRICTNESS
                          cprInfo, ppCprInfo, 
                          strictnessInfo,
 #endif
@@ -336,7 +336,7 @@ pprIdBndr id = ppr id <+>
               (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) <+>
@@ -356,12 +356,12 @@ ppIdInfo b info
   = 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
@@ -369,7 +369,7 @@ ppIdInfo b info
   where
     a = arityInfo info
     g = tyGenInfo info
-#ifdef DEBUG
+#ifdef OLD_STRICTNESS
     s = strictnessInfo info
     m = cprInfo info
 #endif
@@ -378,11 +378,11 @@ ppIdInfo b info
 
 
 \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 _)