Note [aBSENT_ERROR_ID]
We use aBSENT_ERROR_ID to build absent fillers for lifted types in workers. E.g.
f x = (case x of (a,b) -> b) + 1::Int
The demand analyser figures out that only the second component of x is
used, and does a w/w split thus
f x = case x of (a,b) -> $wf b
$wf b = let a = absentError "blah"
x = (a,b)
in <the original RHS of f>
After some simplification, the (absentError "blah") thunk normally goes away.
See also Note [Absent fillers] in GHC.Core.Opt.WorkWrap.Utils.
Historical Note
We used to have exprIsHNF respond True to absentError and *not* mark it as diverging.
Here's the reason for the former. It doesn't apply anymore because we no longer say
that `a` is absent (A). Instead it gets (head strict) demand 1A and we won't
emit the absent error:
#14285 had, roughly
data T a = MkT a !a
{-# INLINABLE f # References 1
- Absent fillers GHC.Core.Opt.WorkWrap.Utils
Referenced by 2
- GHC.Core.Make call site ×2