projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Another round of External Core fixes
[ghc-hetmet.git]
/
compiler
/
specialise
/
Specialise.lhs
diff --git
a/compiler/specialise/Specialise.lhs
b/compiler/specialise/Specialise.lhs
index
67dc39c
..
5350406
100644
(file)
--- a/
compiler/specialise/Specialise.lhs
+++ b/
compiler/specialise/Specialise.lhs
@@
-47,8
+47,7
@@
import ErrUtils ( dumpIfSet_dyn )
import BasicTypes ( Activation( AlwaysActive ) )
import Bag
import List ( partition )
import BasicTypes ( Activation( AlwaysActive ) )
import Bag
import List ( partition )
-import Util ( zipEqual, zipWithEqual, cmpList, lengthIs,
- equalLength, lengthAtLeast, notNull )
+import Util
import Outputable
import FastString
import Outputable
import FastString
@@
-672,7
+671,7
@@
specExpr subst (Case scrut case_bndr ty alts) = do
spec_alt (con, args, rhs) = do
(rhs', uds) <- specExpr subst_rhs rhs
spec_alt (con, args, rhs) = do
(rhs', uds) <- specExpr subst_rhs rhs
- let (uds', rhs'') = do dumpUDs args uds rhs'
+ let (uds', rhs'') = dumpUDs args uds rhs'
return ((con, args', rhs''), uds')
where
(subst_rhs, args') = substBndrs subst_alt args
return ((con, args', rhs''), uds')
where
(subst_rhs, args') = substBndrs subst_alt args
@@
-900,14
+899,13
@@
specDefn subst calls (fn, rhs)
where
my_zipEqual doc xs ys
where
my_zipEqual doc xs ys
-#ifdef DEBUG
- | not (equalLength xs ys) = pprPanic "my_zipEqual" (vcat
+ | debugIsOn && not (equalLength xs ys)
+ = pprPanic "my_zipEqual" (vcat
[ ppr xs, ppr ys
, ppr fn <+> ppr call_ts
, ppr (idType fn), ppr theta
, ppr n_dicts, ppr rhs_dicts
, ppr rhs])
[ ppr xs, ppr ys
, ppr fn <+> ppr call_ts
, ppr (idType fn), ppr theta
, ppr n_dicts, ppr rhs_dicts
, ppr rhs])
-#endif
| otherwise = zipEqual doc xs ys
\end{code}
| otherwise = zipEqual doc xs ys
\end{code}
@@
-1220,7
+1218,7
@@
cloneBindSM :: Subst -> CoreBind -> SpecM (Subst, Subst, CoreBind)
-- Return the substitution to use for RHSs, and the one to use for the body
cloneBindSM subst (NonRec bndr rhs) = do
us <- getUniqueSupplyM
-- Return the substitution to use for RHSs, and the one to use for the body
cloneBindSM subst (NonRec bndr rhs) = do
us <- getUniqueSupplyM
- let (subst', bndr') = do cloneIdBndr subst us bndr
+ let (subst', bndr') = cloneIdBndr subst us bndr
return (subst, subst', NonRec bndr' rhs)
cloneBindSM subst (Rec pairs) = do
return (subst, subst', NonRec bndr' rhs)
cloneBindSM subst (Rec pairs) = do