X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcoreSyn%2FCoreUnfold.lhs;h=f8043d47573147b81d62ff60e366702c52dfc70e;hb=c56450419ef6c819ad86ab01dca6fd2966b11305;hp=798d94b4670d1cd3b59b6864a5fb532f22ee6546;hpb=dd80417d02a28091ca9f5081c2183373bdec617a;p=ghc-hetmet.git diff --git a/compiler/coreSyn/CoreUnfold.lhs b/compiler/coreSyn/CoreUnfold.lhs index 798d94b..f8043d4 100644 --- a/compiler/coreSyn/CoreUnfold.lhs +++ b/compiler/coreSyn/CoreUnfold.lhs @@ -1169,14 +1169,12 @@ exprIsConApp_maybe id_unf expr -- Look through unfoldings, but only cheap ones, because -- we are effectively duplicating the unfolding - | CoreUnfolding { uf_expandable = expand_me, uf_tmpl = rhs } <- unfolding - , expand_me = -- pprTrace "expanding" (ppr fun $$ ppr rhs) $ - analyse rhs args + | Just rhs <- expandUnfolding_maybe unfolding + = -- pprTrace "expanding" (ppr fun $$ ppr rhs) $ + analyse rhs args where is_saturated = count isValArg args == idArity fun - unfolding = id_unf fun -- Does not look through loop breakers - -- ToDo: we *may* look through variables that are NOINLINE - -- in this phase, and that is really not right + unfolding = id_unf fun analyse _ _ = Nothing