[project @ 2002-03-20 11:24:42 by simonpj]
[ghc-hetmet.git] / ghc / compiler / specialise / SpecConstr.lhs
index b5dde8d..9ff7d16 100644 (file)
@@ -14,12 +14,12 @@ import CoreSyn
 import CoreLint                ( showPass, endPass )
 import CoreUtils       ( exprType, eqExpr, mkPiTypes )
 import CoreFVs                 ( exprsFreeVars )
+import CoreTidy                ( pprTidyIdRules )
 import WwLib           ( mkWorkerArgs )
 import DataCon         ( dataConRepArity )
 import Type            ( tyConAppArgs )
-import PprCore         ( pprCoreRules )
 import Id              ( Id, idName, idType, idSpecialisation,
-                         isDataConId_maybe,
+                         isDataConId_maybe, 
                          mkUserLocal, mkSysLocal )
 import Var             ( Var )
 import VarEnv
@@ -181,7 +181,7 @@ specConstrProgram dflags us binds
        endPass dflags "SpecConstr" 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
@@ -189,8 +189,6 @@ specConstrProgram dflags us binds
     go env (bind:binds) = scBind env bind      `thenUs` \ (env', _, bind') ->
                          go env' binds         `thenUs` \ binds' ->
                          returnUs (bind' : binds')
-
-dump_specs var = pprCoreRules var (idSpecialisation var)
 \end{code}
 
 
@@ -492,7 +490,6 @@ spec_one :: ScEnv
 
 spec_one env fn rhs (pats, rule_number)
   = getUniqueUs                `thenUs` \ spec_uniq ->
-    getUniqueUs                `thenUs` \ hack_uniq ->
     let 
        fn_name      = idName fn
        fn_loc       = nameSrcLoc fn_name
@@ -562,7 +559,7 @@ argToPat env us (Var v)     -- Don't uniqify existing vars,
   = (us, Var v)                -- so that we can spot when we pass them twice
 
 argToPat env us arg
-  = (us1, Var (mkSysLocal SLIT("sc") (uniqFromSupply us2) (exprType arg)))
+  = (us1, Var (mkSysLocal FSLIT("sc") (uniqFromSupply us2) (exprType arg)))
   where
     (us1,us2) = splitUniqSupply us