Skip to content

Look through untyped TH splices in tcInferAppHead_maybe

Ryan Scott requested to merge wip/T21038 into master

Previously, surrounding a head expression with a TH splice would defeat tcInferAppHead_maybe, preventing some expressions from typechecking that used to typecheck in previous GHC versions (see #21038 (closed) for examples). This is simple enough to fix: just look through HsSpliceEs in tcInferAppHead_maybe. I've added some additional prose to Note [Application chains and heads] in GHC.Tc.Gen.App to accompany this change.

Fixes #21038 (closed).

Merge request reports