Worker/wrapper should not make error thunk for strict constructor field
Consider
data T = MkT Int ![Int]
f :: T -> blah
f t = case t of { MkT x _ -> blah }
Currently we make a worker for f
looking like
$wf :: Int -> blah
$wf x = let y = absentError "error message"
t = MkT x y
in case t of { MkT x _ -> blah }
with an error-thunk for y
. But this is very naughty because MkT
is strict in its second arg, and should only have evaluated values there.
This messes up Andreas's work on tagging !1472 (closed).