diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2021-03-25 20:06:28 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-03-31 11:13:28 -0400 |
commit | 2fcebb72d97edd1e630002bef89bc6982529e36f (patch) | |
tree | f99af71a7e68e8a42b3223c069990554a5795786 /compiler/GHC/Hs | |
parent | dbadd672ba7da67533c34d8594ac7f91dde0f415 (diff) | |
download | haskell-2fcebb72d97edd1e630002bef89bc6982529e36f.tar.gz |
EPA : Rename AddApiAnn to AddEpAnn
As port of the process of migrating naming from API Annotations to
exact print annotations (EPA)
Follow-up from !2418, see #19579
Diffstat (limited to 'compiler/GHC/Hs')
-rw-r--r-- | compiler/GHC/Hs/Binds.hs | 4 | ||||
-rw-r--r-- | compiler/GHC/Hs/Decls.hs | 10 | ||||
-rw-r--r-- | compiler/GHC/Hs/Dump.hs | 14 | ||||
-rw-r--r-- | compiler/GHC/Hs/Expr.hs | 6 | ||||
-rw-r--r-- | compiler/GHC/Hs/Pat.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Hs/Type.hs | 8 |
6 files changed, 22 insertions, 22 deletions
diff --git a/compiler/GHC/Hs/Binds.hs b/compiler/GHC/Hs/Binds.hs index 6383eb01b8..e40d1acc93 100644 --- a/compiler/GHC/Hs/Binds.hs +++ b/compiler/GHC/Hs/Binds.hs @@ -593,8 +593,8 @@ type instance XXFixitySig (GhcPass p) = NoExtCon data AnnSig = AnnSig { - asDcolon :: AddApiAnn, -- Not an AnnAnchor to capture unicode option - asRest :: [AddApiAnn] + asDcolon :: AddEpAnn, -- Not an AnnAnchor to capture unicode option + asRest :: [AddEpAnn] } deriving Data diff --git a/compiler/GHC/Hs/Decls.hs b/compiler/GHC/Hs/Decls.hs index e5e64267bf..bc0aaff318 100644 --- a/compiler/GHC/Hs/Decls.hs +++ b/compiler/GHC/Hs/Decls.hs @@ -1028,13 +1028,13 @@ type instance Anno (SourceText, RuleName) = SrcSpan data HsRuleAnn = HsRuleAnn - { ra_tyanns :: Maybe (AddApiAnn, AddApiAnn) + { ra_tyanns :: Maybe (AddEpAnn, AddEpAnn) -- ^ The locations of 'forall' and '.' for forall'd type vars - -- Using AddApiAnn to capture possible unicode variants - , ra_tmanns :: Maybe (AddApiAnn, AddApiAnn) + -- Using AddEpAnn to capture possible unicode variants + , ra_tmanns :: Maybe (AddEpAnn, AddEpAnn) -- ^ The locations of 'forall' and '.' for forall'd term vars - -- Using AddApiAnn to capture possible unicode variants - , ra_rest :: [AddApiAnn] + -- Using AddEpAnn to capture possible unicode variants + , ra_rest :: [AddEpAnn] } deriving (Data, Eq) flattenRuleDecls :: [LRuleDecls (GhcPass p)] -> [LRuleDecl (GhcPass p)] diff --git a/compiler/GHC/Hs/Dump.hs b/compiler/GHC/Hs/Dump.hs index 18605d3532..68ce567e46 100644 --- a/compiler/GHC/Hs/Dump.hs +++ b/compiler/GHC/Hs/Dump.hs @@ -54,7 +54,7 @@ showAstData bs ba a0 = blankLine $$ showAstData' a0 `extQ` string `extQ` fastString `extQ` srcSpan `extQ` realSrcSpan `extQ` annotation `extQ` annotationModule - `extQ` annotationAddApiAnn + `extQ` annotationAddEpAnn `extQ` annotationGrhsAnn `extQ` annotationApiAnnHsCase `extQ` annotationApiAnnHsLet @@ -178,12 +178,12 @@ showAstData bs ba a0 = blankLine $$ showAstData' a0 (text "")) - addApiAnn :: AddApiAnn -> SDoc - addApiAnn (AddApiAnn a s) = case ba of + addApiAnn :: AddEpAnn -> SDoc + addApiAnn (AddEpAnn a s) = case ba of BlankApiAnnotations -> parens - $ text "blanked:" <+> text "AddApiAnn" + $ text "blanked:" <+> text "AddEpAnn" NoBlankApiAnnotations -> - parens $ text "AddApiAnn" <+> ppr a <+> annAnchor s + parens $ text "AddEpAnn" <+> ppr a <+> annAnchor s var :: Var -> SDoc var v = braces $ text "Var:" <+> ppr v @@ -229,8 +229,8 @@ showAstData bs ba a0 = blankLine $$ showAstData' a0 annotationModule :: ApiAnn' AnnsModule -> SDoc annotationModule = annotation' (text "ApiAnn' AnnsModule") - annotationAddApiAnn :: ApiAnn' AddApiAnn -> SDoc - annotationAddApiAnn = annotation' (text "ApiAnn' AddApiAnn") + annotationAddEpAnn :: ApiAnn' AddEpAnn -> SDoc + annotationAddEpAnn = annotation' (text "ApiAnn' AddEpAnn") annotationGrhsAnn :: ApiAnn' GrhsAnn -> SDoc annotationGrhsAnn = annotation' (text "ApiAnn' GrhsAnn") diff --git a/compiler/GHC/Hs/Expr.hs b/compiler/GHC/Hs/Expr.hs index 9d3e3dcf39..0659c0f654 100644 --- a/compiler/GHC/Hs/Expr.hs +++ b/compiler/GHC/Hs/Expr.hs @@ -209,7 +209,7 @@ could only do that if the extension field was strict (#18764) data ApiAnnHsCase = ApiAnnHsCase { hsCaseAnnCase :: AnnAnchor , hsCaseAnnOf :: AnnAnchor - , hsCaseAnnsRest :: [AddApiAnn] + , hsCaseAnnsRest :: [AddEpAnn] } deriving Data data ApiAnnUnboundVar = ApiAnnUnboundVar @@ -981,7 +981,7 @@ instance (Outputable a, Outputable b) => Outputable (HsExpansion a b) where ************************************************************************ -} -type instance XCmdArrApp GhcPs = ApiAnn' AddApiAnn +type instance XCmdArrApp GhcPs = ApiAnn' AddEpAnn type instance XCmdArrApp GhcRn = NoExtField type instance XCmdArrApp GhcTc = Type @@ -1187,7 +1187,7 @@ type instance XXGRHSs (GhcPass _) _ = NoExtCon data GrhsAnn = GrhsAnn { ga_vbar :: Maybe AnnAnchor, -- TODO:AZ do we need this? - ga_sep :: AddApiAnn -- ^ Match separator location + ga_sep :: AddEpAnn -- ^ Match separator location } deriving (Data) type instance XCGRHS (GhcPass _) _ = ApiAnn' GrhsAnn diff --git a/compiler/GHC/Hs/Pat.hs b/compiler/GHC/Hs/Pat.hs index c5cd2ccb78..34b4b8e173 100644 --- a/compiler/GHC/Hs/Pat.hs +++ b/compiler/GHC/Hs/Pat.hs @@ -163,7 +163,7 @@ type instance XHsRecField _ = ApiAnn -- API Annotations types data ApiAnnSumPat = ApiAnnSumPat - { sumPatParens :: [AddApiAnn] + { sumPatParens :: [AddEpAnn] , sumPatVbarsBefore :: [AnnAnchor] , sumPatVbarsAfter :: [AnnAnchor] } deriving Data diff --git a/compiler/GHC/Hs/Type.hs b/compiler/GHC/Hs/Type.hs index 59fcaf9fe1..5c49796b2f 100644 --- a/compiler/GHC/Hs/Type.hs +++ b/compiler/GHC/Hs/Type.hs @@ -151,7 +151,7 @@ type instance XHsForAllInvis (GhcPass _) = ApiAnnForallTy type instance XXHsForAllTelescope (GhcPass _) = NoExtCon -type ApiAnnForallTy = ApiAnn' (AddApiAnn, AddApiAnn) +type ApiAnnForallTy = ApiAnn' (AddEpAnn, AddEpAnn) -- ^ Location of 'forall' and '->' for HsForAllVis -- Location of 'forall' and '.' for HsForAllInvis @@ -474,15 +474,15 @@ mkHsAppKindTy ext ty k -- It returns API Annotations for any parens removed splitHsFunType :: LHsType (GhcPass p) - -> ( [AddApiAnn], ApiAnnComments -- The locations of any parens and - -- comments discarded + -> ( [AddEpAnn], ApiAnnComments -- The locations of any parens and + -- comments discarded , [HsScaled (GhcPass p) (LHsType (GhcPass p))], LHsType (GhcPass p)) splitHsFunType ty = go ty where go (L l (HsParTy an ty)) = let (anns, cs, args, res) = splitHsFunType ty - anns' = anns ++ annParen2AddApiAnn an + anns' = anns ++ annParen2AddEpAnn an cs' = cs S.<> apiAnnComments (ann l) S.<> apiAnnComments an in (anns', cs', args, res) |