Update to ghc-lib-parser-9.10, build with GHC 9.10.1 in CI, drop GHC 9.4, update bounds.
See the changelog for details about the new syntactic features in GHC 9.10.
We can remove our HasSrcSpan in favor of ghc-lib-parser's HasLoc.
The EPA extension points in constructors do (usually) no longer contain the comments (they are now usually in the annotation part of a Located). We relied on this in p_if (as of #1092). Instead of laboriously passing the comments down from where we unwrap the LHsExpr, I added a new function getEnclosingComments to the R monad that leverages the comment stream, as that seemed much less invasive.
See the review comments for some further minor points.
Update to
ghc-lib-parser-9.10
, build with GHC 9.10.1 in CI, drop GHC 9.4, update bounds.HasSrcSpan
in favor ofghc-lib-parser
'sHasLoc
.Located
). We relied on this inp_if
(as of #1092). Instead of laboriously passing the comments down from where we unwrap theLHsExpr
, I added a new functiongetEnclosingComments
to theR
monad that leverages the comment stream, as that seemed much less invasive.