diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2020-12-30 09:37:25 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2021-01-01 15:09:51 +0000 |
commit | 9996197176094c56c8891f2504e7f8cce80aedac (patch) | |
tree | 07cfec071c609d20d8f8fc76de24655bd91c6e3c /compiler/GHC/Core/Utils.hs | |
parent | 2113a1d600e579bb0f54a0526a03626f105c0365 (diff) | |
download | haskell-wip/T19133.tar.gz |
Don't use absentError thunks for strict constructor fieldswip/T19133
This patch fixes #19133 by using LitRubbish for strict constructor
fields, even if they are of lifted types. Previously LitRubbish
worked only for unlifted (but boxed) types.
The change is very easy, although I needed a boolean field in
LitRubbish to say whether or not it is lifted. (That seemed easier
than giving it another type argument.
This is preparing for Andreas's work on establishing the invariant
that strict constructor fields are always tagged and evaluated
(see #16970).
Meanwhile, nothing was actually wrong before, so there are no tests.
Diffstat (limited to 'compiler/GHC/Core/Utils.hs')
-rw-r--r-- | compiler/GHC/Core/Utils.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Core/Utils.hs b/compiler/GHC/Core/Utils.hs index 2e40ddc659..afebee0678 100644 --- a/compiler/GHC/Core/Utils.hs +++ b/compiler/GHC/Core/Utils.hs @@ -1611,7 +1611,7 @@ expr_ok primop_ok other_expr Var f -> app_ok primop_ok f args -- 'LitRubbish' is the only literal that can occur in the head of an -- application and will not be matched by the above case (Var /= Lit). - Lit lit -> ASSERT( lit == rubbishLit ) True + Lit lit -> ASSERT( isRubbishLit lit ) True _ -> False ----------------------------- |