[Git][ghc/ghc][master] EPA: Remove unused hsCaseAnnsRest
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Mon Oct 7 09:17:23 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00
EPA: Remove unused hsCaseAnnsRest
We never populate it, so remove it.
- - - - -
4 changed files:
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Parser.y
- testsuite/tests/parser/should_compile/DumpSemis.stderr
- utils/check-exact/ExactPrint.hs
Changes:
=====================================
compiler/GHC/Hs/Expr.hs
=====================================
@@ -202,11 +202,10 @@ type instance XUntypedBracket GhcTc = HsBracketTc
data EpAnnHsCase = EpAnnHsCase
{ hsCaseAnnCase :: EpaLocation
, hsCaseAnnOf :: EpaLocation
- , hsCaseAnnsRest :: [AddEpAnn]
} deriving Data
instance NoAnn EpAnnHsCase where
- noAnn = EpAnnHsCase noAnn noAnn noAnn
+ noAnn = EpAnnHsCase noAnn noAnn
data EpAnnUnboundVar = EpAnnUnboundVar
{ hsUnboundBackquotes :: (EpaLocation, EpaLocation)
=====================================
compiler/GHC/Parser.y
=====================================
@@ -3042,7 +3042,7 @@ aexp :: { ECP }
return $ ECP $
$4 >>= \ $4 ->
mkHsCasePV (comb3 $1 $3 $4) $2 $4
- (EpAnnHsCase (glAA $1) (glAA $3) []) }
+ (EpAnnHsCase (glAA $1) (glAA $3)) }
-- QualifiedDo.
| DO stmtlist {% do
hintQualifiedDo $1
=====================================
testsuite/tests/parser/should_compile/DumpSemis.stderr
=====================================
@@ -2170,8 +2170,7 @@
(HsCase
(EpAnnHsCase
(EpaSpan { DumpSemis.hs:37:3-6 })
- (EpaSpan { DumpSemis.hs:37:10-11 })
- [])
+ (EpaSpan { DumpSemis.hs:37:10-11 }))
(L
(EpAnn
(EpaSpan { DumpSemis.hs:37:8 })
=====================================
utils/check-exact/ExactPrint.hs
=====================================
@@ -1211,7 +1211,6 @@ laiElseSemi k parent = fmap (\new -> parent { aiElseSemi = new })
-- data EpAnnHsCase = EpAnnHsCase
-- { hsCaseAnnCase :: EpaLocation
-- , hsCaseAnnOf :: EpaLocation
--- , hsCaseAnnsRest :: [AddEpAnn]
-- } deriving Data
lhsCaseAnnCase :: Lens EpAnnHsCase EpaLocation
@@ -1222,10 +1221,6 @@ lhsCaseAnnOf :: Lens EpAnnHsCase EpaLocation
lhsCaseAnnOf k parent = fmap (\new -> parent { hsCaseAnnOf = new })
(k (hsCaseAnnOf parent))
-lhsCaseAnnsRest :: Lens EpAnnHsCase [AddEpAnn]
-lhsCaseAnnsRest k parent = fmap (\new -> parent { hsCaseAnnsRest = new })
- (k (hsCaseAnnsRest parent))
-
-- ---------------------------------------------------------------------
-- data HsRuleAnn
@@ -3161,11 +3156,8 @@ instance ExactPrint (HsExpr GhcPs) where
an0 <- markLensKw an lhsCaseAnnCase AnnCase
e' <- markAnnotated e
an1 <- markLensKw an0 lhsCaseAnnOf AnnOf
- an2 <- markEpAnnL an1 lhsCaseAnnsRest AnnOpenC
- an3 <- markEpAnnAllL' an2 lhsCaseAnnsRest AnnSemi
alts' <- setLayoutBoth $ markAnnotated alts
- an4 <- markEpAnnL an3 lhsCaseAnnsRest AnnCloseC
- return (HsCase an4 e' alts')
+ return (HsCase an1 e' alts')
exact (HsIf an e1 e2 e3) = do
an0 <- markLensKw an laiIf AnnIf
@@ -3635,11 +3627,8 @@ instance ExactPrint (HsCmd GhcPs) where
an0 <- markLensKw an lhsCaseAnnCase AnnCase
e' <- markAnnotated e
an1 <- markLensKw an0 lhsCaseAnnOf AnnOf
- an2 <- markEpAnnL an1 lhsCaseAnnsRest AnnOpenC
- an3 <- markEpAnnAllL' an2 lhsCaseAnnsRest AnnSemi
alts' <- markAnnotated alts
- an4 <- markEpAnnL an3 lhsCaseAnnsRest AnnCloseC
- return (HsCmdCase an4 e' alts')
+ return (HsCmdCase an1 e' alts')
exact (HsCmdIf an a e1 e2 e3) = do
an0 <- markLensKw an laiIf AnnIf
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4a2f0f1302f5919dfc9c8cbc410fceb19e7309ba
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4a2f0f1302f5919dfc9c8cbc410fceb19e7309ba
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20241007/9cf1373d/attachment-0001.html>
More information about the ghc-commits
mailing list