summaryrefslogtreecommitdiff
path: root/compiler/GHC/Parser/Annotation.hs
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2021-03-25 21:38:13 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-03-31 11:13:28 -0400
commitd03005e642710d0f1f78757292e0fe65287e5f0a (patch)
tree2bd2c11a00577649ac19ddc6aa9705efa19bc8e5 /compiler/GHC/Parser/Annotation.hs
parent0fe5175ac537c0ce2afe969ec82a0d1c73a4ae38 (diff)
downloadhaskell-d03005e642710d0f1f78757292e0fe65287e5f0a.tar.gz
EPA : rename 'api annotations' to 'exact print annotations'
In comments, and notes. Follow-up from !2418, see #19579
Diffstat (limited to 'compiler/GHC/Parser/Annotation.hs')
-rw-r--r--compiler/GHC/Parser/Annotation.hs26
1 files changed, 13 insertions, 13 deletions
diff --git a/compiler/GHC/Parser/Annotation.hs b/compiler/GHC/Parser/Annotation.hs
index 6acb712833..23b0864246 100644
--- a/compiler/GHC/Parser/Annotation.hs
+++ b/compiler/GHC/Parser/Annotation.hs
@@ -57,9 +57,9 @@ module GHC.Parser.Annotation (
-- ** Querying annotations
getLocAnn,
- apiAnnAnns, apiAnnAnnsL,
+ epAnnAnns, epAnnAnnsL,
annParen2AddEpAnn,
- apiAnnComments,
+ epAnnComments,
-- ** Working with locations of annotations
sortLocatedA,
@@ -95,7 +95,7 @@ import GHC.Utils.Outputable hiding ( (<>) )
import GHC.Utils.Panic
{-
-Note [Api annotations]
+Note [exact print annotations]
~~~~~~~~~~~~~~~~~~~~~~
Given a parse tree of a Haskell module, how can we reconstruct
the original Haskell source code, retaining all whitespace and
@@ -195,7 +195,7 @@ https://gitlab.haskell.org/ghc/ghc/wikis/api-annotations
--
-- Note: in general the names of these are taken from the
-- corresponding token, unless otherwise noted
--- See note [Api annotations] above for details of the usage
+-- See note [exact print annotations] above for details of the usage
data AnnKeywordId
= AnnAnyclass
| AnnAs
@@ -967,13 +967,13 @@ widenAnchorR (Anchor s op) r = Anchor (combineRealSrcSpans s r) op
widenLocatedAn :: SrcSpanAnn' an -> [AddEpAnn] -> SrcSpanAnn' an
widenLocatedAn (SrcSpanAnn a l) as = SrcSpanAnn a (widenSpan l as)
-apiAnnAnnsL :: EpAnn' a -> [a]
-apiAnnAnnsL EpAnnNotUsed = []
-apiAnnAnnsL (EpAnn _ anns _) = [anns]
+epAnnAnnsL :: EpAnn' a -> [a]
+epAnnAnnsL EpAnnNotUsed = []
+epAnnAnnsL (EpAnn _ anns _) = [anns]
-apiAnnAnns :: EpAnn -> [AddEpAnn]
-apiAnnAnns EpAnnNotUsed = []
-apiAnnAnns (EpAnn _ anns _) = anns
+epAnnAnns :: EpAnn -> [AddEpAnn]
+epAnnAnns EpAnnNotUsed = []
+epAnnAnns (EpAnn _ anns _) = anns
annParen2AddEpAnn :: EpAnn' AnnParen -> [AddEpAnn]
annParen2AddEpAnn EpAnnNotUsed = []
@@ -982,9 +982,9 @@ annParen2AddEpAnn (EpAnn _ (AnnParen pt o c) _)
where
(ai,ac) = parenTypeKws pt
-apiAnnComments :: EpAnn' an -> EpAnnComments
-apiAnnComments EpAnnNotUsed = AnnComments []
-apiAnnComments (EpAnn _ _ cs) = cs
+epAnnComments :: EpAnn' an -> EpAnnComments
+epAnnComments EpAnnNotUsed = AnnComments []
+epAnnComments (EpAnn _ _ cs) = cs
-- ---------------------------------------------------------------------
-- sortLocatedA :: [LocatedA a] -> [LocatedA a]