projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tweak comments in MkId and follow mkStringLit renaming
[ghc-hetmet.git]
/
compiler
/
simplCore
/
SimplUtils.lhs
diff --git
a/compiler/simplCore/SimplUtils.lhs
b/compiler/simplCore/SimplUtils.lhs
index
45ef88a
..
be5c4b3
100644
(file)
--- a/
compiler/simplCore/SimplUtils.lhs
+++ b/
compiler/simplCore/SimplUtils.lhs
@@
-758,11
+758,11
@@
postInlineUnconditionally env top_lvl bndr occ_info rhs unfolding
-- in \y. ....case f of {...} ....
-- Here f is used just once, and duplicating the case work is fine (exprIsCheap).
-- But
-- in \y. ....case f of {...} ....
-- Here f is used just once, and duplicating the case work is fine (exprIsCheap).
-- But
--- * We can't preInlineUnconditionally because that woud invalidate
--- the occ info for b.
--- * We can't postInlineUnconditionally because the RHS is big, and
--- that risks exponential behaviour
--- * We can't call-site inline, because the rhs is big
+-- - We can't preInlineUnconditionally because that woud invalidate
+-- the occ info for b.
+-- - We can't postInlineUnconditionally because the RHS is big, and
+-- that risks exponential behaviour
+-- - We can't call-site inline, because the rhs is big
-- Alas!
where
-- Alas!
where
@@
-1425,6
+1425,11
@@
prepareDefault _ _ case_bndr (Just (tycon, inst_tys)) imposs_cons (Just deflt_rh
_ -> return [(DEFAULT, [], deflt_rhs)]
_ -> return [(DEFAULT, [], deflt_rhs)]
+ | debugIsOn, isAlgTyCon tycon, [] <- tyConDataCons tycon
+ = pprTrace "prepareDefault" (ppr case_bndr <+> ppr tycon)
+ -- This can legitimately happen for type families
+ $ return [(DEFAULT, [], deflt_rhs)]
+
--------- Catch-all cases -----------
prepareDefault _dflags _env _case_bndr _bndr_ty _imposs_cons (Just deflt_rhs)
= return [(DEFAULT, [], deflt_rhs)]
--------- Catch-all cases -----------
prepareDefault _dflags _env _case_bndr _bndr_ty _imposs_cons (Just deflt_rhs)
= return [(DEFAULT, [], deflt_rhs)]