diff options
author | Sebastian Graf <sebastian.graf@kit.edu> | 2021-05-16 18:25:14 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-06-02 23:06:18 -0400 |
commit | b585aff0608f5c6db3219ff4832ee02ac9e9520b (patch) | |
tree | 23cd24bed91c51d3645d330dcf1390c2d38985ca /compiler/GHC/Core/Opt/Simplify.hs | |
parent | b66cf8ad218264593efc8bceddc86c53ce89bbeb (diff) | |
download | haskell-b585aff0608f5c6db3219ff4832ee02ac9e9520b.tar.gz |
WW: Mark absent errors as diverging again
As the now historic part of `NOTE [aBSENT_ERROR_ID]` explains, we used to have
`exprIsHNF` respond True to `absentError` and give it a non-bottoming demand
signature, in order to perform case-to-let on certain `case`s we used to emit
that scrutinised `absentError` (Urgh).
What changed, why don't we emit these questionable absent errors anymore?
The absent errors in question filled in for binders that would end up in
strict fields after being seq'd. Apparently, the old strictness analyser would
give these binders an absent demand, but today we give them head-strict demand
`1A` and thus don't replace with absent errors at all.
This fixes items (1) and (2) of #19853.
Diffstat (limited to 'compiler/GHC/Core/Opt/Simplify.hs')
-rw-r--r-- | compiler/GHC/Core/Opt/Simplify.hs | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/compiler/GHC/Core/Opt/Simplify.hs b/compiler/GHC/Core/Opt/Simplify.hs index 8b2f5b1274..12b277beb2 100644 --- a/compiler/GHC/Core/Opt/Simplify.hs +++ b/compiler/GHC/Core/Opt/Simplify.hs @@ -2510,13 +2510,6 @@ We treat the unlifted and lifted cases separately: we won't build a thunk because the let is strict. See also Note [Case-to-let for strictly-used binders] - NB: absentError satisfies exprIsHNF: see Note [aBSENT_ERROR_ID] in GHC.Core.Make. - We want to turn - case (absentError "foo") of r -> ...MkT r... - into - let r = absentError "foo" in ...MkT r... - - Note [Case-to-let for strictly-used binders] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If we have this: |