summaryrefslogtreecommitdiff
path: root/compiler/Language/Haskell/Syntax/Decls.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/Language/Haskell/Syntax/Decls.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/Language/Haskell/Syntax/Decls.hs')
-rw-r--r--compiler/Language/Haskell/Syntax/Decls.hs59
1 files changed, 30 insertions, 29 deletions
diff --git a/compiler/Language/Haskell/Syntax/Decls.hs b/compiler/Language/Haskell/Syntax/Decls.hs
index 0b93e4b265..59ae54544a 100644
--- a/compiler/Language/Haskell/Syntax/Decls.hs
+++ b/compiler/Language/Haskell/Syntax/Decls.hs
@@ -132,7 +132,7 @@ type LHsDecl p = XRec p (HsDecl p)
-- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnSemi'
--
--- For details on above see note [Api annotations] in GHC.Parser.Annotation
+-- For details on above see note [exact print annotations] in GHC.Parser.Annotation
-- | A Haskell Declaration
data HsDecl p
@@ -400,7 +400,7 @@ data TyClDecl pass
-- 'GHC.Parser.Annotation.AnnEqual','GHC.Parser.Annotation.AnnRarrow',
-- 'GHC.Parser.Annotation.AnnVbar'
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
FamDecl { tcdFExt :: XFamDecl pass, tcdFam :: FamilyDecl pass }
| -- | @type@ declaration
@@ -408,7 +408,7 @@ data TyClDecl pass
-- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnType',
-- 'GHC.Parser.Annotation.AnnEqual',
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
SynDecl { tcdSExt :: XSynDecl pass -- ^ Post renameer, FVs
, tcdLName :: LIdP pass -- ^ Type constructor
, tcdTyVars :: LHsQTyVars pass -- ^ Type variables; for an
@@ -425,7 +425,7 @@ data TyClDecl pass
-- 'GHC.Parser.Annotation.AnnNewType','GHC.Parser.Annotation.AnnDcolon'
-- 'GHC.Parser.Annotation.AnnWhere',
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
DataDecl { tcdDExt :: XDataDecl pass -- ^ Post renamer, CUSK flag, FVs
, tcdLName :: LIdP pass -- ^ Type constructor
, tcdTyVars :: LHsQTyVars pass -- ^ Type variables
@@ -452,7 +452,7 @@ data TyClDecl pass
-- 'GHC.Parser.Annotation.AnnComma'
-- 'GHC.Parser.Annotation.AnnRarrow'
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
| XTyClDecl !(XXTyClDecl pass)
data FunDep pass
@@ -797,14 +797,14 @@ data FamilyResultSig pass = -- see Note [FamilyResultSig]
NoSig (XNoSig pass)
-- ^ - 'GHC.Parser.Annotation.AnnKeywordId' :
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
| KindSig (XCKindSig pass) (LHsKind pass)
-- ^ - 'GHC.Parser.Annotation.AnnKeywordId' :
-- 'GHC.Parser.Annotation.AnnOpenP','GHC.Parser.Annotation.AnnDcolon',
-- 'GHC.Parser.Annotation.AnnCloseP'
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
| TyVarSig (XTyVarSig pass) (LHsTyVarBndr () pass)
-- ^ - 'GHC.Parser.Annotation.AnnKeywordId' :
@@ -812,7 +812,7 @@ data FamilyResultSig pass = -- see Note [FamilyResultSig]
-- 'GHC.Parser.Annotation.AnnCloseP', 'GHC.Parser.Annotation.AnnEqual'
| XFamilyResultSig !(XXFamilyResultSig pass)
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
-- | Located type Family Declaration
@@ -838,7 +838,7 @@ data FamilyDecl pass = FamilyDecl
-- 'GHC.Parser.Annotation.AnnEqual', 'GHC.Parser.Annotation.AnnRarrow',
-- 'GHC.Parser.Annotation.AnnVbar'
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
-- | Located Injectivity Annotation
@@ -858,7 +858,7 @@ data InjectivityAnn pass
-- ^ - 'GHC.Parser.Annotation.AnnKeywordId' :
-- 'GHC.Parser.Annotation.AnnRarrow', 'GHC.Parser.Annotation.AnnVbar'
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
| XInjectivityAnn !(XXInjectivityAnn pass)
data FamilyInfo pass
@@ -918,7 +918,7 @@ data HsDataDefn pass -- The payload of a data type defn
dd_derivs :: HsDeriving pass -- ^ Optional 'deriving' clause
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
}
| XHsDataDefn !(XXHsDataDefn pass)
@@ -938,7 +938,7 @@ type LHsDerivingClause pass = XRec pass (HsDerivingClause pass)
--
-- - 'GHC.Parser.Annotation.AnnKeywordId' :
-- 'GHC.Parser.Annotation.AnnDeriving', 'GHC.Parser.Annotation.AnnStock',
--- 'GHC.Parser.Annotation.AnnAnyClass', 'Api.AnnNewtype',
+-- 'GHC.Parser.Annotation.AnnAnyClass', 'GHC.Parser.Annotation.AnnNewtype',
-- 'GHC.Parser.Annotation.AnnOpen','GHC.Parser.Annotation.AnnClose'
data HsDerivingClause pass
-- See Note [Deriving strategies] in GHC.Tc.Deriv
@@ -1021,7 +1021,7 @@ type LConDecl pass = XRec pass (ConDecl pass)
-- ^ May have 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnSemi' when
-- in a GADT constructor list
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
-- |
--
@@ -1045,7 +1045,7 @@ type LConDecl pass = XRec pass (ConDecl pass)
-- 'GHC.Parser.Annotation.AnnDarrow','GHC.Parser.Annotation.AnnDarrow',
-- 'GHC.Parser.Annotation.AnnForall','GHC.Parser.Annotation.AnnDot'
--- For details on above see note [Api annotations] in GHC.Parser.Annotation
+-- For details on above see note [exact print annotations] in GHC.Parser.Annotation
-- | data Constructor Declaration
data ConDecl pass
@@ -1056,8 +1056,9 @@ data ConDecl pass
-- The following fields describe the type after the '::'
-- See Note [GADT abstract syntax]
, con_bndrs :: XRec pass (HsOuterSigTyVarBndrs pass)
- -- ^ The outermost type variable binders, be they explicit or implicit.
- -- The 'XRec' is used to anchor API annotations, AnnForall and AnnDot.
+ -- ^ The outermost type variable binders, be they explicit or
+ -- implicit. The 'XRec' is used to anchor exact print
+ -- annotations, AnnForall and AnnDot.
, con_mb_cxt :: Maybe (LHsContext pass) -- ^ User-written context (if any)
, con_g_args :: HsConDeclGADTDetails pass -- ^ Arguments; never infix
, con_res_ty :: LHsType pass -- ^ Result type
@@ -1256,7 +1257,7 @@ type LTyFamInstEqn pass = XRec pass (TyFamInstEqn pass)
-- ^ May have 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnSemi'
-- when in a list
--- For details on above see note [Api annotations] in GHC.Parser.Annotation
+-- For details on above see note [exact print annotations] in GHC.Parser.Annotation
-- | Haskell Type Patterns
type HsTyPats pass = [LHsTypeArg pass]
@@ -1316,7 +1317,7 @@ data TyFamInstDecl pass
-- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnType',
-- 'GHC.Parser.Annotation.AnnInstance',
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
| XTyFamInstDecl !(XXTyFamInstDecl pass)
----------------- Data family instances -------------
@@ -1334,7 +1335,7 @@ newtype DataFamInstDecl pass
-- 'GHC.Parser.Annotation.AnnWhere','GHC.Parser.Annotation.AnnOpen',
-- 'GHC.Parser.Annotation.AnnClose'
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
----------------- Family instances (common types) -------------
@@ -1357,7 +1358,7 @@ data FamEqn pass rhs
-- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnEqual'
| XFamEqn !(XXFamEqn pass rhs)
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
----------------- Class instances -------------
@@ -1379,14 +1380,14 @@ data ClsInstDecl pass
-- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnOpen',
-- 'GHC.Parser.Annotation.AnnClose',
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
}
-- ^
-- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnInstance',
-- 'GHC.Parser.Annotation.AnnWhere',
-- 'GHC.Parser.Annotation.AnnOpen','GHC.Parser.Annotation.AnnClose',
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
| XClsInstDecl !(XXClsInstDecl pass)
----------------- Instances of all kinds -------------
@@ -1437,10 +1438,10 @@ data DerivDecl pass = DerivDecl
, deriv_overlap_mode :: Maybe (XRec pass OverlapMode)
-- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnDeriving',
-- 'GHC.Parser.Annotation.AnnInstance', 'GHC.Parser.Annotation.AnnStock',
- -- 'GHC.Parser.Annotation.AnnAnyClass', 'Api.AnnNewtype',
+ -- 'GHC.Parser.Annotation.AnnAnyClass', 'GHC.Parser.Annotation.AnnNewtype',
-- 'GHC.Parser.Annotation.AnnOpen','GHC.Parser.Annotation.AnnClose'
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
}
| XDerivDecl !(XXDerivDecl pass)
@@ -1499,7 +1500,7 @@ data DefaultDecl pass
-- ^ - 'GHC.Parser.Annotation.AnnKeywordId's : 'GHC.Parser.Annotation.AnnDefault',
-- 'GHC.Parser.Annotation.AnnOpen','GHC.Parser.Annotation.AnnClose'
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
| XDefaultDecl !(XXDefaultDecl pass)
{-
@@ -1537,7 +1538,7 @@ data ForeignDecl pass
-- 'GHC.Parser.Annotation.AnnImport','GHC.Parser.Annotation.AnnExport',
-- 'GHC.Parser.Annotation.AnnDcolon'
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
| XForeignDecl !(XXForeignDecl pass)
{-
@@ -1687,7 +1688,7 @@ data RuleBndr pass
-- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnOpen',
-- 'GHC.Parser.Annotation.AnnDcolon','GHC.Parser.Annotation.AnnClose'
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
collectRuleBndrSigTys :: [RuleBndr pass] -> [HsPatSigType pass]
collectRuleBndrSigTys bndrs = [ty | RuleBndrSig _ _ ty <- bndrs]
@@ -1773,7 +1774,7 @@ data AnnDecl pass = HsAnnotation
-- 'GHC.Parser.Annotation.AnnModule'
-- 'GHC.Parser.Annotation.AnnClose'
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
| XAnnDecl !(XXAnnDecl pass)
-- | Annotation Provenance
@@ -1811,5 +1812,5 @@ data RoleAnnotDecl pass
-- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnType',
-- 'GHC.Parser.Annotation.AnnRole'
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
+ -- For details on above see note [exact print annotations] in GHC.Parser.Annotation
| XRoleAnnotDecl !(XXRoleAnnotDecl pass)