summaryrefslogtreecommitdiff
path: root/compiler/GHC/Parser.y
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2021-05-11 18:06:05 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-05-12 21:42:21 -0400
commitc34f4c0cf55ac5c81b6600daab2a66e0adf89f50 (patch)
treef910e2f97e105e2cd4705421d8195206418e2a64 /compiler/GHC/Parser.y
parent67a5a91ef5e61f3b3c84481d8a396ed48cd5d96e (diff)
downloadhaskell-c34f4c0cf55ac5c81b6600daab2a66e0adf89f50.tar.gz
EPA: Fix incorrect SrcSpan for FamDecl
The SrcSpan for a type family declaration did not include the family equations. Closes #19821
Diffstat (limited to 'compiler/GHC/Parser.y')
-rw-r--r--compiler/GHC/Parser.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Parser.y b/compiler/GHC/Parser.y
index 23ba493df2..26f6e8b836 100644
--- a/compiler/GHC/Parser.y
+++ b/compiler/GHC/Parser.y
@@ -1253,7 +1253,7 @@ ty_decl :: { LTyClDecl GhcPs }
where_type_family
-- Note the use of type for the head; this allows
-- infix type constructors to be declared
- {% mkFamDecl (comb4 $1 (reLoc $3) $4 $5) (snd $ unLoc $6) TopLevel $3
+ {% mkFamDecl (comb5 $1 (reLoc $3) $4 $5 $6) (snd $ unLoc $6) TopLevel $3
(snd $ unLoc $4) (snd $ unLoc $5)
(mj AnnType $1:mj AnnFamily $2:(fst $ unLoc $4)
++ (fst $ unLoc $5) ++ (fst $ unLoc $6)) }