[project @ 2002-04-05 23:24:25 by sof]
[ghc-hetmet.git] / ghc / compiler / specialise / Specialise.lhs
index 746814f..16d3748 100644 (file)
@@ -25,8 +25,8 @@ import VarEnv
 import CoreSyn
 import CoreUtils       ( applyTypeToArgs )
 import CoreFVs         ( exprFreeVars, exprsFreeVars )
+import CoreTidy                ( pprTidyIdRules )
 import CoreLint                ( showPass, endPass )
-import PprCore         ( pprCoreRules )
 import Rules           ( addIdSpecialisations, lookupRule )
 
 import UniqSupply      ( UniqSupply,
@@ -41,7 +41,7 @@ import BasicTypes     ( Activation( AlwaysActive ) )
 import Bag
 import List            ( partition )
 import Util            ( zipEqual, zipWithEqual, cmpList, lengthIs,
-                         equalLength, lengthAtLeast )
+                         equalLength, lengthAtLeast, notNull )
 import Outputable
 
 
@@ -586,7 +586,7 @@ specProgram dflags us binds
        endPass dflags "Specialise" Opt_D_dump_spec binds'
 
        dumpIfSet_dyn dflags Opt_D_dump_rules "Top-level specialisations"
-                 (vcat (map dump_specs (concat (map bindersOf binds'))))
+                 (vcat (map pprTidyIdRules (concat (map bindersOf binds'))))
 
        return binds'
   where
@@ -601,8 +601,6 @@ specProgram dflags us binds
     go (bind:binds) = go binds                                 `thenSM` \ (binds', uds) ->
                      specBind top_subst bind uds       `thenSM` \ (bind', uds') ->
                      returnSM (bind' ++ binds', uds')
-
-dump_specs var = pprCoreRules var (idSpecialisation var)
 \end{code}
 
 %************************************************************************
@@ -788,7 +786,7 @@ specDefn subst calls (fn, rhs)
        -- The first case is the interesting one
   |  rhs_tyvars `lengthIs` n_tyvars    -- Rhs of fn's defn has right number of big lambdas
   && rhs_bndrs  `lengthAtLeast` n_dicts        -- and enough dict args
-  && not (null calls_for_me)           -- And there are some calls to specialise
+  && notNull calls_for_me              -- And there are some calls to specialise
   && not (isDataConWrapId fn)          -- And it's not a data con wrapper, which have
                                        -- stupid overloading that simply discard the dictionary