[Git][ghc/ghc][wip/T20749] Don't treat strict datacon workers as expandable
Sebastian Graf (@sgraf812)
gitlab at gitlab.haskell.org
Thu Aug 29 05:37:37 UTC 2024
Sebastian Graf pushed to branch wip/T20749 at Glasgow Haskell Compiler / GHC
Commits:
43186a1c by Sebastian Graf at 2024-08-29T07:37:31+02:00
Don't treat strict datacon workers as expandable
- - - - -
1 changed file:
- compiler/GHC/Core/Utils.hs
Changes:
=====================================
compiler/GHC/Core/Utils.hs
=====================================
@@ -1558,7 +1558,7 @@ isWorkFreeApp fn n_val_args
= True
| otherwise
= case idDetails fn of
- DataConWorkId {} -> True
+ DataConWorkId dc -> isLazyDataConRep dc
PrimOpId op _ -> primOpIsWorkFree op
_ -> False
@@ -1589,7 +1589,8 @@ isExpandableApp fn n_val_args
PrimOpId {} -> False
_ | isDeadEndId fn -> False
-- See Note [isExpandableApp: bottoming functions]
- | isConLikeId fn -> True
+ | not (isDataConWorkId fn) -- Handled by isWorkFreeApp!
+ , isConLikeId fn -> True
| all_args_are_preds -> True
| otherwise -> False
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/43186a1cc62a1baf94fc750fe71b951d23cc5691
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/43186a1cc62a1baf94fc750fe71b951d23cc5691
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240829/30e7161e/attachment-0001.html>
More information about the ghc-commits
mailing list