Simplify SimplCont, plus some other small changes to the Simplifier
[ghc-hetmet.git] / compiler / coreSyn / CoreUtils.lhs
index c8d6611..e3dc239 100644 (file)
@@ -23,7 +23,7 @@ module CoreUtils (
        findDefault, findAlt, isDefaultAlt, mergeAlts, trimConArgs,
 
        -- Properties of expressions
-       exprType, coreAltType,
+       exprType, coreAltType, coreAltsType,
        exprIsDupable, exprIsTrivial, exprIsCheap, 
        exprIsHNF,exprOkForSpeculation, exprIsBig, 
        exprIsConApp_maybe, exprIsBottom,
@@ -109,6 +109,10 @@ exprType other = pprTrace "exprType" (pprCoreExpr other) alphaTy
 
 coreAltType :: CoreAlt -> Type
 coreAltType (_,_,rhs) = exprType rhs
+
+coreAltsType :: [CoreAlt] -> Type
+coreAltsType (alt:_) = coreAltType alt
+coreAltsType []             = panic "corAltsType"
 \end{code}
 
 @mkPiType@ makes a (->) type or a forall type, depending on whether
@@ -1550,9 +1554,6 @@ rhsIsStatic :: PackageId -> CoreExpr -> Bool
 --        dynamic
 -- 
 --    c) don't look through unfolding of f in (f x).
---
--- When opt_RuntimeTypes is on, we keep type lambdas and treat
--- them as making the RHS re-entrant (non-updatable).
 
 rhsIsStatic _this_pkg rhs = is_static False rhs
   where