summaryrefslogtreecommitdiff
path: root/compiler/GHC/Hs
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2021-03-25 21:46:56 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-03-31 11:13:28 -0400
commit49bc1e9ec854e571dfa78ac43565073586579f31 (patch)
tree4cf1ea1b7f53581ae57a493ba757cf1130585a03 /compiler/GHC/Hs
parentd03005e642710d0f1f78757292e0fe65287e5f0a (diff)
downloadhaskell-49bc1e9ec854e571dfa78ac43565073586579f31.tar.gz
EPA : rename AnnAnchor to EpaAnchor
Follow-up from !2418, see #19579
Diffstat (limited to 'compiler/GHC/Hs')
-rw-r--r--compiler/GHC/Hs/Binds.hs2
-rw-r--r--compiler/GHC/Hs/Dump.hs10
-rw-r--r--compiler/GHC/Hs/Expr.hs30
-rw-r--r--compiler/GHC/Hs/ImpExp.hs22
-rw-r--r--compiler/GHC/Hs/Pat.hs4
-rw-r--r--compiler/GHC/Hs/Utils.hs2
6 files changed, 35 insertions, 35 deletions
diff --git a/compiler/GHC/Hs/Binds.hs b/compiler/GHC/Hs/Binds.hs
index c89406a63e..72f54828ee 100644
--- a/compiler/GHC/Hs/Binds.hs
+++ b/compiler/GHC/Hs/Binds.hs
@@ -593,7 +593,7 @@ type instance XXFixitySig (GhcPass p) = NoExtCon
data AnnSig
= AnnSig {
- asDcolon :: AddEpAnn, -- Not an AnnAnchor to capture unicode option
+ asDcolon :: AddEpAnn, -- Not an EpaAnchor to capture unicode option
asRest :: [AddEpAnn]
} deriving Data
diff --git a/compiler/GHC/Hs/Dump.hs b/compiler/GHC/Hs/Dump.hs
index 1e282a1ee3..8a69ad0c60 100644
--- a/compiler/GHC/Hs/Dump.hs
+++ b/compiler/GHC/Hs/Dump.hs
@@ -66,7 +66,7 @@ showAstData bs ba a0 = blankLine $$ showAstData' a0
`extQ` lit `extQ` litr `extQ` litt
`extQ` sourceText
`extQ` deltaPos
- `extQ` annAnchor
+ `extQ` epaAnchor
`extQ` bytestring
`extQ` name `extQ` occName `extQ` moduleName `extQ` var
`extQ` dataCon
@@ -136,9 +136,9 @@ showAstData bs ba a0 = blankLine $$ showAstData' a0
BlankSrcSpanFile -> parens $ text "SourceText" <+> text src
_ -> parens $ text "SourceText" <+> text "blanked"
- annAnchor :: AnnAnchor -> SDoc
- annAnchor (AR r) = parens $ text "AR" <+> realSrcSpan r
- annAnchor (AD d) = parens $ text "AD" <+> deltaPos d
+ epaAnchor :: EpaAnchor -> SDoc
+ epaAnchor (AR r) = parens $ text "AR" <+> realSrcSpan r
+ epaAnchor (AD d) = parens $ text "AD" <+> deltaPos d
deltaPos :: DeltaPos -> SDoc
deltaPos (DP l c) = parens $ text "DP" <+> ppr l <+> ppr c
@@ -183,7 +183,7 @@ showAstData bs ba a0 = blankLine $$ showAstData' a0
BlankEpAnnotations -> parens
$ text "blanked:" <+> text "AddEpAnn"
NoBlankEpAnnotations ->
- parens $ text "AddEpAnn" <+> ppr a <+> annAnchor s
+ parens $ text "AddEpAnn" <+> ppr a <+> epaAnchor s
var :: Var -> SDoc
var v = braces $ text "Var:" <+> ppr v
diff --git a/compiler/GHC/Hs/Expr.hs b/compiler/GHC/Hs/Expr.hs
index f9782756bd..436da995a7 100644
--- a/compiler/GHC/Hs/Expr.hs
+++ b/compiler/GHC/Hs/Expr.hs
@@ -207,14 +207,14 @@ could only do that if the extension field was strict (#18764)
-- API Annotations types
data EpAnnHsCase = EpAnnHsCase
- { hsCaseAnnCase :: AnnAnchor
- , hsCaseAnnOf :: AnnAnchor
+ { hsCaseAnnCase :: EpaAnchor
+ , hsCaseAnnOf :: EpaAnchor
, hsCaseAnnsRest :: [AddEpAnn]
} deriving Data
data EpAnnUnboundVar = EpAnnUnboundVar
- { hsUnboundBackquotes :: (AnnAnchor, AnnAnchor)
- , hsUnboundHole :: AnnAnchor
+ { hsUnboundBackquotes :: (EpaAnchor, EpaAnchor)
+ , hsUnboundHole :: EpaAnchor
} deriving Data
type instance XVar (GhcPass _) = NoExtField
@@ -378,27 +378,27 @@ data XXExprGhcTc
data AnnExplicitSum
= AnnExplicitSum {
- aesOpen :: AnnAnchor,
- aesBarsBefore :: [AnnAnchor],
- aesBarsAfter :: [AnnAnchor],
- aesClose :: AnnAnchor
+ aesOpen :: EpaAnchor,
+ aesBarsBefore :: [EpaAnchor],
+ aesBarsAfter :: [EpaAnchor],
+ aesClose :: EpaAnchor
} deriving Data
data AnnsLet
= AnnsLet {
- alLet :: AnnAnchor,
- alIn :: AnnAnchor
+ alLet :: EpaAnchor,
+ alIn :: EpaAnchor
} deriving Data
data AnnFieldLabel
= AnnFieldLabel {
- afDot :: Maybe AnnAnchor
+ afDot :: Maybe EpaAnchor
} deriving Data
data AnnProjection
= AnnProjection {
- apOpen :: AnnAnchor, -- ^ '('
- apClose :: AnnAnchor -- ^ ')'
+ apOpen :: EpaAnchor, -- ^ '('
+ apClose :: EpaAnchor -- ^ ')'
} deriving Data
-- ---------------------------------------------------------------------
@@ -411,7 +411,7 @@ type instance XXHsFieldLabel (GhcPass _) = NoExtCon
type instance XPresent (GhcPass _) = EpAnn
-type instance XMissing GhcPs = EpAnn' AnnAnchor
+type instance XMissing GhcPs = EpAnn' EpaAnchor
type instance XMissing GhcRn = NoExtField
type instance XMissing GhcTc = Scaled Type
@@ -1186,7 +1186,7 @@ type instance XXGRHSs (GhcPass _) _ = NoExtCon
data GrhsAnn
= GrhsAnn {
- ga_vbar :: Maybe AnnAnchor, -- TODO:AZ do we need this?
+ ga_vbar :: Maybe EpaAnchor, -- TODO:AZ do we need this?
ga_sep :: AddEpAnn -- ^ Match separator location
} deriving (Data)
diff --git a/compiler/GHC/Hs/ImpExp.hs b/compiler/GHC/Hs/ImpExp.hs
index 2622f243ae..103359281b 100644
--- a/compiler/GHC/Hs/ImpExp.hs
+++ b/compiler/GHC/Hs/ImpExp.hs
@@ -64,9 +64,9 @@ data ImportDeclQualifiedStyle
-- | Given two possible located 'qualified' tokens, compute a style
-- (in a conforming Haskell program only one of the two can be not
-- 'Nothing'). This is called from "GHC.Parser".
-importDeclQualifiedStyle :: Maybe AnnAnchor
- -> Maybe AnnAnchor
- -> (Maybe AnnAnchor, ImportDeclQualifiedStyle)
+importDeclQualifiedStyle :: Maybe EpaAnchor
+ -> Maybe EpaAnchor
+ -> (Maybe EpaAnchor, ImportDeclQualifiedStyle)
importDeclQualifiedStyle mPre mPost =
if isJust mPre then (mPre, QualifiedPre)
else if isJust mPost then (mPost,QualifiedPost) else (Nothing, NotQualified)
@@ -127,12 +127,12 @@ type instance Anno [LocatedA (IE (GhcPass p))] = SrcSpanAnnL
-- API Annotations types
data EpAnnImportDecl = EpAnnImportDecl
- { importDeclAnnImport :: AnnAnchor
- , importDeclAnnPragma :: Maybe (AnnAnchor, AnnAnchor)
- , importDeclAnnSafe :: Maybe AnnAnchor
- , importDeclAnnQualified :: Maybe AnnAnchor
- , importDeclAnnPackage :: Maybe AnnAnchor
- , importDeclAnnAs :: Maybe AnnAnchor
+ { importDeclAnnImport :: EpaAnchor
+ , importDeclAnnPragma :: Maybe (EpaAnchor, EpaAnchor)
+ , importDeclAnnSafe :: Maybe EpaAnchor
+ , importDeclAnnQualified :: Maybe EpaAnchor
+ , importDeclAnnPackage :: Maybe EpaAnchor
+ , importDeclAnnAs :: Maybe EpaAnchor
} deriving (Data)
-- ---------------------------------------------------------------------
@@ -209,8 +209,8 @@ instance (OutputableBndrId p
-- the original source.
data IEWrappedName name
= IEName (LocatedN name) -- ^ no extra
- | IEPattern AnnAnchor (LocatedN name) -- ^ pattern X
- | IEType AnnAnchor (LocatedN name) -- ^ type (:+:)
+ | IEPattern EpaAnchor (LocatedN name) -- ^ pattern X
+ | IEType EpaAnchor (LocatedN name) -- ^ type (:+:)
deriving (Eq,Data)
-- | Located name with possible adornment
diff --git a/compiler/GHC/Hs/Pat.hs b/compiler/GHC/Hs/Pat.hs
index 36537728de..6efbfb860e 100644
--- a/compiler/GHC/Hs/Pat.hs
+++ b/compiler/GHC/Hs/Pat.hs
@@ -164,8 +164,8 @@ type instance XHsRecField _ = EpAnn
data EpAnnSumPat = EpAnnSumPat
{ sumPatParens :: [AddEpAnn]
- , sumPatVbarsBefore :: [AnnAnchor]
- , sumPatVbarsAfter :: [AnnAnchor]
+ , sumPatVbarsBefore :: [EpaAnchor]
+ , sumPatVbarsAfter :: [EpaAnchor]
} deriving Data
-- ---------------------------------------------------------------------
diff --git a/compiler/GHC/Hs/Utils.hs b/compiler/GHC/Hs/Utils.hs
index 8151041996..a23c1a1868 100644
--- a/compiler/GHC/Hs/Utils.hs
+++ b/compiler/GHC/Hs/Utils.hs
@@ -657,7 +657,7 @@ mkLHsVarTuple ids ext = mkLHsTupleExpr (map nlHsVar ids) ext
nlTuplePat :: [LPat GhcPs] -> Boxity -> LPat GhcPs
nlTuplePat pats box = noLocA (TuplePat noAnn pats box)
-missingTupArg :: EpAnn' AnnAnchor -> HsTupArg GhcPs
+missingTupArg :: EpAnn' EpaAnchor -> HsTupArg GhcPs
missingTupArg ann = Missing ann
mkLHsPatTup :: [LPat GhcRn] -> LPat GhcRn