summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Gen/Match.hs
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2021-10-28 19:05:51 +0100
committerAlan Zimmerman <alan.zimm@gmail.com>2021-11-02 21:39:32 +0000
commit39eed84c2188b15ed312b4468f1a44c6a49fb268 (patch)
tree0db2b8b53a33d4f61c273504b5665ba333474476 /compiler/GHC/Tc/Gen/Match.hs
parenta7e1be3d84d2b7d0515f909175cdfa5dcf0dc55c (diff)
downloadhaskell-39eed84c2188b15ed312b4468f1a44c6a49fb268.tar.gz
EPA: Get rid of bare SrcSpan's in the ParsedSource
The ghc-exactPrint library has had to re-introduce the relatavise phase. This is needed if you change the length of an identifier and want the layout to be preserved afterwards. It is not possible to relatavise a bare SrcSpan, so introduce `SrcAnn NoEpAnns` for them instead. Updates haddock submodule.
Diffstat (limited to 'compiler/GHC/Tc/Gen/Match.hs')
-rw-r--r--compiler/GHC/Tc/Gen/Match.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC/Tc/Gen/Match.hs b/compiler/GHC/Tc/Gen/Match.hs
index ab767b877c..1b2ebf797a 100644
--- a/compiler/GHC/Tc/Gen/Match.hs
+++ b/compiler/GHC/Tc/Gen/Match.hs
@@ -205,8 +205,8 @@ type AnnoBody body
, Anno (Match GhcTc (LocatedA (body GhcTc))) ~ SrcSpanAnnA
, Anno [LocatedA (Match GhcRn (LocatedA (body GhcRn)))] ~ SrcSpanAnnL
, Anno [LocatedA (Match GhcTc (LocatedA (body GhcTc)))] ~ SrcSpanAnnL
- , Anno (GRHS GhcRn (LocatedA (body GhcRn))) ~ SrcSpan
- , Anno (GRHS GhcTc (LocatedA (body GhcTc))) ~ SrcSpan
+ , Anno (GRHS GhcRn (LocatedA (body GhcRn))) ~ SrcAnn NoEpAnns
+ , Anno (GRHS GhcTc (LocatedA (body GhcTc))) ~ SrcAnn NoEpAnns
, Anno (StmtLR GhcRn GhcRn (LocatedA (body GhcRn))) ~ SrcSpanAnnA
, Anno (StmtLR GhcTc GhcTc (LocatedA (body GhcTc))) ~ SrcSpanAnnA
)
@@ -289,7 +289,7 @@ tcGRHSs :: AnnoBody body
tcGRHSs ctxt (GRHSs _ grhss binds) res_ty
= do { (binds', ugrhss)
<- tcLocalBinds binds $
- mapM (tcCollectingUsage . wrapLocM (tcGRHS ctxt res_ty)) grhss
+ mapM (tcCollectingUsage . wrapLocMA (tcGRHS ctxt res_ty)) grhss
; let (usages, grhss') = unzip ugrhss
; tcEmitBindingUsage $ supUEs usages
; return (GRHSs emptyComments grhss' binds') }