[Git][ghc/ghc][wip/T17521] Use RepStrictness instead of ImplBang
Jaro Reinders (@Noughtmare)
gitlab at gitlab.haskell.org
Tue Jul 18 11:53:25 UTC 2023
Jaro Reinders pushed to branch wip/T17521 at Glasgow Haskell Compiler / GHC
Commits:
596ecdf0 by Jaro Reinders at 2023-07-18T13:53:16+02:00
Use RepStrictness instead of ImplBang
- - - - -
1 changed file:
- compiler/GHC/Core/Utils.hs
Changes:
=====================================
compiler/GHC/Core/Utils.hs
=====================================
@@ -2039,15 +2039,15 @@ exprIsNestedTrivialConApp :: CoreExpr -> Bool
exprIsNestedTrivialConApp x
| (Var v, xs) <- collectArgs x
, Just dc <- isDataConWorkId_maybe v
- = and (zipWith f (map isBanged (dataConImplBangs dc)) xs)
+ = and (zipWith field_ok (map isMarkedStrict (dataConRepStrictness dc)) xs)
where
- f bang x
- | not bang
+ field_ok strict x
+ | not strict
, exprIsTrivial x
= True
| (Var v, xs) <- collectArgs x
, Just dc <- isDataConWorkId_maybe v
- = and (zipWith f (map isBanged (dataConImplBangs dc)) xs)
+ = and (zipWith field_ok (map isMarkedStrict (dataConRepStrictness dc)) xs)
| otherwise
= False
exprIsNestedTrivialConApp _ = False
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/596ecdf04203dd163bc5812c242a4bc098480e45
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/596ecdf04203dd163bc5812c242a4bc098480e45
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/20230718/0beb5bea/attachment-0001.html>
More information about the ghc-commits
mailing list