summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2021-05-09 23:34:47 +0100
committerBen Gamari <ben@smart-cactus.org>2021-05-12 20:27:10 -0400
commitbdcba23143292b737f3766e6cd509f0619bdaab4 (patch)
tree67a2eb2e6ab1947cdcf42f131b1c23eb0387f30d /compiler
parenta60f6eb58291816df89b53deeba7f84e955f4010 (diff)
downloadhaskell-bdcba23143292b737f3766e6cd509f0619bdaab4.tar.gz
EPA: record annotations for braces in LetStmt
Closes #19814 (cherry picked from commit c3868451e974ee16762a1804d568afea8ed691c7)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/GHC/Parser.y4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/GHC/Parser.y b/compiler/GHC/Parser.y
index 6aa75987c1..29d76b0a5a 100644
--- a/compiler/GHC/Parser.y
+++ b/compiler/GHC/Parser.y
@@ -1792,9 +1792,7 @@ binds :: { Located (HsLocalBinds GhcPs) }
-- No type declarations
: decllist {% do { val_binds <- cvBindGroup (unLoc $ snd $ unLoc $1)
; cs <- getCommentsFor (gl $1)
- ; if (isNilOL (unLoc $ snd $ unLoc $1))
- then return (sL1 $1 $ HsValBinds (EpAnn (glR $1) (AnnList (Just $ glR $1) Nothing Nothing [] []) cs) val_binds)
- else return (sL1 $1 $ HsValBinds (EpAnn (glR $1) (fst $ unLoc $1) cs) val_binds) } }
+ ; return (sL1 $1 $ HsValBinds (EpAnn (glR $1) (fst $ unLoc $1) cs) val_binds)} }
| '{' dbinds '}' {% acs (\cs -> (L (comb3 $1 $2 $3)
$ HsIPBinds (EpAnn (glR $1) (AnnList (Just$ glR $2) (Just $ moc $1) (Just $ mcc $3) [] []) cs) (IPBinds noExtField (reverse $ unLoc $2)))) }