[Git][ghc/ghc][master] EPA: Remove redundant code

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon May 20 01:30:36 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
8e04efcf by Alan Zimmerman at 2024-05-19T21:29:34-04:00
EPA: Remove redundant code

Remove unused
  epAnnAnns function
  various cases for showAstData that no longer exist

- - - - -


2 changed files:

- compiler/GHC/Hs/Dump.hs
- compiler/GHC/Parser/Annotation.hs


Changes:

=====================================
compiler/GHC/Hs/Dump.hs
=====================================
@@ -59,16 +59,10 @@ showAstData bs ba a0 = blankLine $$ showAstData' a0
               `ext1Q` list
               `extQ` list_addEpAnn
               `extQ` string `extQ` fastString `extQ` srcSpan `extQ` realSrcSpan
-              `extQ` annotation
               `extQ` annotationModule
-              `extQ` annotationAddEpAnn
               `extQ` annotationGrhsAnn
-              `extQ` annotationEpAnnHsCase
               `extQ` annotationAnnList
               `extQ` annotationEpAnnImportDecl
-              `extQ` annotationAnnParen
-              `extQ` annotationTrailingAnn
-              `extQ` annotationEpaLocation
               `extQ` annotationNoEpAnns
               `extQ` addEpAnn
               `extQ` annParen
@@ -235,36 +229,18 @@ showAstData bs ba a0 = blankLine $$ showAstData' a0
 
             -- -------------------------
 
-            annotation :: EpAnn [AddEpAnn] -> SDoc
-            annotation = annotation' (text "EpAnn [AddEpAnn]")
-
             annotationModule :: EpAnn AnnsModule -> SDoc
             annotationModule = annotation' (text "EpAnn AnnsModule")
 
-            annotationAddEpAnn :: EpAnn AddEpAnn -> SDoc
-            annotationAddEpAnn = annotation' (text "EpAnn AddEpAnn")
-
             annotationGrhsAnn :: EpAnn GrhsAnn -> SDoc
             annotationGrhsAnn = annotation' (text "EpAnn GrhsAnn")
 
-            annotationEpAnnHsCase :: EpAnn EpAnnHsCase -> SDoc
-            annotationEpAnnHsCase = annotation' (text "EpAnn EpAnnHsCase")
-
             annotationAnnList :: EpAnn AnnList -> SDoc
             annotationAnnList = annotation' (text "EpAnn AnnList")
 
             annotationEpAnnImportDecl :: EpAnn EpAnnImportDecl -> SDoc
             annotationEpAnnImportDecl = annotation' (text "EpAnn EpAnnImportDecl")
 
-            annotationAnnParen :: EpAnn AnnParen -> SDoc
-            annotationAnnParen = annotation' (text "EpAnn AnnParen")
-
-            annotationTrailingAnn :: EpAnn TrailingAnn -> SDoc
-            annotationTrailingAnn = annotation' (text "EpAnn TrailingAnn")
-
-            annotationEpaLocation :: EpAnn EpaLocation -> SDoc
-            annotationEpaLocation = annotation' (text "EpAnn EpaLocation")
-
             annotationNoEpAnns :: EpAnn NoEpAnns -> SDoc
             annotationNoEpAnns = annotation' (text "EpAnn NoEpAnns")
 


=====================================
compiler/GHC/Parser/Annotation.hs
=====================================
@@ -70,7 +70,6 @@ module GHC.Parser.Annotation (
 
   -- ** Querying annotations
   getLocAnn,
-  epAnnAnns,
   annParen2AddEpAnn,
   epAnnComments,
 
@@ -1139,9 +1138,6 @@ widenLocatedAn (EpAnn (EpaSpan l) a cs) as = EpAnn (spanAsAnchor l') a cs
     l' = widenSpan l as
 widenLocatedAn (EpAnn anc a cs) _as = EpAnn anc a cs
 
-epAnnAnns :: EpAnn [AddEpAnn] -> [AddEpAnn]
-epAnnAnns (EpAnn _ anns _) = anns
-
 annParen2AddEpAnn :: AnnParen -> [AddEpAnn]
 annParen2AddEpAnn (AnnParen pt o c)
   = [AddEpAnn ai o, AddEpAnn ac c]



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8e04efcfccc34e82ac41c63f0b2d0e3824880efc

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8e04efcfccc34e82ac41c63f0b2d0e3824880efc
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/20240519/69ba0a5b/attachment-0001.html>


More information about the ghc-commits mailing list