Look through TH splices in splitHsApps
This modifies splitHsApps
(a key function used in typechecking function
applications) to look through untyped TH splices and quasiquotes. Not doing so
was the cause of #21077 (closed). This builds on !7821 (closed) by making splitHsApps
match on
HsUntypedSpliceTop
, which contains the ThModFinalizers
that must be run as
part of invoking the TH splice. See the new Note [Looking through Template Haskell splices in splitHsApps]
in GHC.Tc.Gen.Head
.
Along the way, I needed to make the type of splitHsApps.set
slightly more
general to accommodate the fact that the location attached to a quasiquote is
a SrcAnn NoEpAnns
rather than a SrcSpanAnnA
.
Fixes #21077 (closed).
Edited by Ryan Scott