projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simplify SimplCont, plus some other small changes to the Simplifier
[ghc-hetmet.git]
/
compiler
/
coreSyn
/
CoreUtils.lhs
diff --git
a/compiler/coreSyn/CoreUtils.lhs
b/compiler/coreSyn/CoreUtils.lhs
index
c8d6611
..
e3dc239
100644
(file)
--- a/
compiler/coreSyn/CoreUtils.lhs
+++ b/
compiler/coreSyn/CoreUtils.lhs
@@
-23,7
+23,7
@@
module CoreUtils (
findDefault, findAlt, isDefaultAlt, mergeAlts, trimConArgs,
-- Properties of expressions
findDefault, findAlt, isDefaultAlt, mergeAlts, trimConArgs,
-- Properties of expressions
- exprType, coreAltType,
+ exprType, coreAltType, coreAltsType,
exprIsDupable, exprIsTrivial, exprIsCheap,
exprIsHNF,exprOkForSpeculation, exprIsBig,
exprIsConApp_maybe, exprIsBottom,
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
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
\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).
-- 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
rhsIsStatic _this_pkg rhs = is_static False rhs
where