diff options
Diffstat (limited to 'compiler/Language/Haskell/Syntax')
-rw-r--r-- | compiler/Language/Haskell/Syntax/Binds.hs | 26 | ||||
-rw-r--r-- | compiler/Language/Haskell/Syntax/Decls.hs | 59 | ||||
-rw-r--r-- | compiler/Language/Haskell/Syntax/Expr.hs | 102 | ||||
-rw-r--r-- | compiler/Language/Haskell/Syntax/Extension.hs | 7 | ||||
-rw-r--r-- | compiler/Language/Haskell/Syntax/Pat.hs | 24 | ||||
-rw-r--r-- | compiler/Language/Haskell/Syntax/Type.hs | 50 |
6 files changed, 136 insertions, 132 deletions
diff --git a/compiler/Language/Haskell/Syntax/Binds.hs b/compiler/Language/Haskell/Syntax/Binds.hs index 2ad43e499c..8c69f10eb8 100644 --- a/compiler/Language/Haskell/Syntax/Binds.hs +++ b/compiler/Language/Haskell/Syntax/Binds.hs @@ -199,7 +199,7 @@ data HsBindLR idL idR -- - 'GHC.Parser.Annotation.AnnEqual','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 FunBind { fun_ext :: XFunBind idL idR, @@ -240,7 +240,7 @@ data HsBindLR idL idR -- 'GHC.Parser.Annotation.AnnEqual','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 | PatBind { pat_ext :: XPatBind idL idR, -- ^ See Note [Bind free vars] pat_lhs :: LPat idL, @@ -291,7 +291,7 @@ data HsBindLR idL idR -- '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 | XHsBindsLR !(XXHsBindsLR idL idR) @@ -325,7 +325,7 @@ data ABExport p -- '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 -- | Pattern Synonym binding data PatSynBind idL idR @@ -595,7 +595,7 @@ type LIPBind id = XRec id (IPBind id) -- ^ 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 -- | Implicit parameter bindings. -- @@ -606,7 +606,7 @@ type LIPBind id = XRec id (IPBind id) -- -- - 'GHC.Parser.Annotation.AnnKeywordId' : '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 data IPBind id = IPBind (XCIPBind id) @@ -647,7 +647,7 @@ data Sig pass -- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnDcolon', -- 'GHC.Parser.Annotation.AnnComma' - -- 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 TypeSig (XTypeSig pass) [LIdP pass] -- LHS of the signature; e.g. f,g,h :: blah @@ -661,7 +661,7 @@ data Sig pass -- 'GHC.Parser.Annotation.AnnDcolon','GHC.Parser.Annotation.AnnForall' -- 'GHC.Parser.Annotation.AnnDot','GHC.Parser.Annotation.AnnDarrow' - -- 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 | PatSynSig (XPatSynSig pass) [LIdP pass] (LHsSigType pass) -- P :: forall a b. Req => Prov => ty @@ -692,7 +692,7 @@ data Sig pass -- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnInfix', -- 'GHC.Parser.Annotation.AnnVal' - -- 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 | FixSig (XFixSig pass) (FixitySig pass) -- | An inline pragma @@ -705,7 +705,7 @@ data Sig pass -- 'GHC.Parser.Annotation.AnnVal','GHC.Parser.Annotation.AnnTilde', -- '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 | InlineSig (XInlineSig pass) (LIdP pass) -- Function name InlinePragma -- Never defaultInlinePragma @@ -721,7 +721,7 @@ data Sig pass -- 'GHC.Parser.Annotation.AnnClose' @']'@ and @'\#-}'@, -- '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 | SpecSig (XSpecSig pass) (LIdP pass) -- Specialise a function or datatype ... [LHsSigType pass] -- ... to these types @@ -739,7 +739,7 @@ data Sig pass -- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnOpen', -- 'GHC.Parser.Annotation.AnnInstance','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 | SpecInstSig (XSpecInstSig pass) SourceText (LHsSigType pass) -- Note [Pragma source text] in GHC.Types.SourceText @@ -751,7 +751,7 @@ data Sig pass -- 'GHC.Parser.Annotation.AnnVbar','GHC.Parser.Annotation.AnnComma', -- '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 | MinimalSig (XMinimalSig pass) SourceText (LBooleanFormula (LIdP pass)) -- Note [Pragma source text] in GHC.Types.SourceText 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) diff --git a/compiler/Language/Haskell/Syntax/Expr.hs b/compiler/Language/Haskell/Syntax/Expr.hs index 2362ea8373..e7756cc804 100644 --- a/compiler/Language/Haskell/Syntax/Expr.hs +++ b/compiler/Language/Haskell/Syntax/Expr.hs @@ -188,7 +188,7 @@ type LHsExpr p = XRec p (HsExpr p) -- ^ May have 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnComma' 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 ------------------------- {- Note [NoSyntaxExpr] @@ -310,7 +310,7 @@ data HsExpr p -- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnLam', -- '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 | HsLamCase (XLamCase p) (MatchGroup p (LHsExpr p)) -- ^ Lambda-case -- @@ -318,7 +318,7 @@ data HsExpr p -- 'GHC.Parser.Annotation.AnnCase','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 | HsApp (XApp p) (LHsExpr p) (LHsExpr p) -- ^ Application @@ -347,7 +347,7 @@ data HsExpr p -- -- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnMinus' - -- 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 | NegApp (XNegApp p) (LHsExpr p) (SyntaxExpr p) @@ -355,7 +355,7 @@ data HsExpr p -- | - '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 | HsPar (XPar p) (LHsExpr p) -- ^ Parenthesised expr; see Note [Parens in HsSyn] @@ -371,7 +371,7 @@ data HsExpr p -- - '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 -- Note [ExplicitTuple] | ExplicitTuple (XExplicitTuple p) @@ -395,7 +395,7 @@ data HsExpr p -- 'GHC.Parser.Annotation.AnnOf','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 | HsCase (XCase p) (LHsExpr p) (MatchGroup p (LHsExpr p)) @@ -405,7 +405,7 @@ data HsExpr p -- 'GHC.Parser.Annotation.AnnThen','GHC.Parser.Annotation.AnnSemi', -- 'GHC.Parser.Annotation.AnnElse', - -- 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 | HsIf (XIf p) -- GhcPs: this is a Bool; False <=> do not use -- rebindable syntax (LHsExpr p) -- predicate @@ -417,7 +417,7 @@ data HsExpr p -- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnIf' -- '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 | HsMultiIf (XMultiIf p) [LGRHS p (LHsExpr p)] -- | let(rec) @@ -426,7 +426,7 @@ data HsExpr p -- 'GHC.Parser.Annotation.AnnOpen' @'{'@, -- 'GHC.Parser.Annotation.AnnClose' @'}'@,'GHC.Parser.Annotation.AnnIn' - -- 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 | HsLet (XLet p) (HsLocalBinds p) (LHsExpr p) @@ -436,7 +436,7 @@ data HsExpr p -- 'GHC.Parser.Annotation.AnnVbar', -- '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 | HsDo (XDo p) -- Type of the whole expression (HsStmtContext (HsDoRn p)) -- The parameterisation of the above is unimportant @@ -449,7 +449,7 @@ data HsExpr p -- - '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 -- See Note [Empty lists] | ExplicitList (XExplicitList p) -- Gives type of components of list @@ -460,7 +460,7 @@ data HsExpr p -- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnOpen' @'{'@, -- 'GHC.Parser.Annotation.AnnDotdot','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 | RecordCon { rcon_ext :: XRecordCon p , rcon_con :: XRec p (ConLikeP p) -- The constructor @@ -473,7 +473,7 @@ data HsExpr p -- 'GHC.Parser.Annotation.AnnComma, 'GHC.Parser.Annotation.AnnDot', -- '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 | RecordUpd { rupd_ext :: XRecordUpd p , rupd_expr :: LHsExpr p @@ -512,7 +512,7 @@ data HsExpr p -- -- - 'GHC.Parser.Annotation.AnnKeywordId' : '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 | ExprWithTySig (XExprWithTySig p) @@ -525,14 +525,14 @@ data HsExpr p -- 'GHC.Parser.Annotation.AnnComma','GHC.Parser.Annotation.AnnDotdot', -- '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 | ArithSeq (XArithSeq p) (Maybe (SyntaxExpr p)) -- For OverloadedLists, the fromList witness (ArithSeqInfo p) - -- 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 ----------------------------------------------------------- -- MetaHaskell Extensions @@ -541,7 +541,7 @@ data HsExpr p -- 'GHC.Parser.Annotation.AnnOpenE','GHC.Parser.Annotation.AnnOpenEQ', -- 'GHC.Parser.Annotation.AnnClose','GHC.Parser.Annotation.AnnCloseQ' - -- 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 | HsBracket (XBracket p) (HsBracket p) -- See Note [Pending Splices] @@ -563,7 +563,7 @@ data HsExpr p -- | - '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 | HsSpliceE (XSpliceE p) (HsSplice p) ----------------------------------------------------------- @@ -574,7 +574,7 @@ data HsExpr p -- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnProc', -- '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 | HsProc (XProc p) (LPat p) -- arrow abstraction, proc (LHsCmdTop p) -- body of the abstraction @@ -584,7 +584,7 @@ data HsExpr p -- static pointers extension -- | - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnStatic', - -- 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 | HsStatic (XStatic p) -- Free variables of the body (LHsExpr p) -- Body @@ -655,7 +655,7 @@ data HsPragE p type LHsTupArg id = XRec id (HsTupArg id) -- | - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnComma' --- 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 Tuple Argument data HsTupArg id @@ -730,14 +730,15 @@ the RHS so that we can build the expression. Note [Located RdrNames] ~~~~~~~~~~~~~~~~~~~~~~~ -A number of syntax elements have seemingly redundant locations attached to them. -This is deliberate, to allow transformations making use of the API Annotations -to easily correlate a Located Name in the RenamedSource with a Located RdrName -in the ParsedSource. +A number of syntax elements have seemingly redundant locations +attached to them. This is deliberate, to allow transformations making +use of the exact print annotations to easily correlate a Located Name +in the RenamedSource with a Located RdrName in the ParsedSource. -There are unfortunately enough differences between the ParsedSource and the -RenamedSource that the API Annotations cannot be used directly with -RenamedSource, so this allows a simple mapping to be used based on the location. +There are unfortunately enough differences between the ParsedSource +and the RenamedSource that the exact print annotations cannot be used +directly with RenamedSource, so this allows a simple mapping to be +used based on the location. Note [ExplicitTuple] ~~~~~~~~~~~~~~~~~~~~ @@ -842,7 +843,7 @@ data HsCmd id -- 'GHC.Parser.Annotation.Annrarrowtail','GHC.Parser.Annotation.AnnLarrowtail', -- 'GHC.Parser.Annotation.AnnRarrowtail' - -- 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 = HsCmdArrApp -- Arrow tail, or arrow application (f -< arg) (XCmdArrApp id) -- type of the arrow expressions f, -- of the form a t t', where arg :: t @@ -855,7 +856,7 @@ data HsCmd id -- | - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnOpenB' @'(|'@, -- 'GHC.Parser.Annotation.AnnCloseB' @'|)'@ - -- 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 | HsCmdArrForm -- Command formation, (| e cmd1 .. cmdn |) (XCmdArrForm id) (LHsExpr id) -- The operator. @@ -876,14 +877,14 @@ data HsCmd id -- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnLam', -- '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 | HsCmdPar (XCmdPar id) (LHsCmd id) -- parenthesised command -- ^ - '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 | HsCmdCase (XCmdCase id) (LHsExpr id) @@ -892,7 +893,7 @@ data HsCmd id -- 'GHC.Parser.Annotation.AnnOf','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 | HsCmdLamCase (XCmdLamCase id) (MatchGroup id (LHsCmd id)) -- bodies are HsCmd's @@ -900,7 +901,7 @@ data HsCmd id -- 'GHC.Parser.Annotation.AnnCase','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 | HsCmdIf (XCmdIf id) (SyntaxExpr id) -- cond function @@ -912,7 +913,7 @@ data HsCmd id -- 'GHC.Parser.Annotation.AnnThen','GHC.Parser.Annotation.AnnSemi', -- 'GHC.Parser.Annotation.AnnElse', - -- 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 | HsCmdLet (XCmdLet id) (HsLocalBinds id) -- let(rec) @@ -921,7 +922,7 @@ data HsCmd id -- 'GHC.Parser.Annotation.AnnOpen' @'{'@, -- 'GHC.Parser.Annotation.AnnClose' @'}'@,'GHC.Parser.Annotation.AnnIn' - -- 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 | HsCmdDo (XCmdDo id) -- Type of the whole expression (XRec id [CmdLStmt id]) @@ -930,7 +931,7 @@ data HsCmd id -- 'GHC.Parser.Annotation.AnnVbar', -- '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 | XCmd !(XXCmd id) -- Note [Trees that Grow] extension point @@ -1009,7 +1010,7 @@ type LMatch id body = XRec id (Match id body) -- ^ 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 data Match p body = Match { m_ext :: XCMatch p body, @@ -1030,8 +1031,8 @@ so on. In order to simplify tooling processing and pretty print output, the provenance is captured in an HsMatchContext. -This is particularly important for the API Annotations for a multi-equation -FunBind. +This is particularly important for the exact print annotations for a +multi-equation FunBind. The parser initially creates a FunBind with a single Match in it for every function definition it sees. @@ -1042,11 +1043,12 @@ where all the Matches are combined. In the process, all the original FunBind fun_id's bar one are discarded, including the locations. -This causes a problem for source to source conversions via API -Annotations, so the original fun_ids and infix flags are preserved in +This causes a problem for source to source conversions via exact print +annotations, so the original fun_ids and infix flags are preserved in the Match, when it originates from a FunBind. -Example infix function definition requiring individual API Annotations +Example infix function definition requiring individual exact print +annotations (&&& ) [] [] = [] xs &&& [] = xs @@ -1071,7 +1073,7 @@ isInfixMatch match = case m_ctxt match of -- 'GHC.Parser.Annotation.AnnOpen','GHC.Parser.Annotation.AnnClose' -- 'GHC.Parser.Annotation.AnnRarrow','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 data GRHSs p body = GRHSs { grhssExt :: XCGRHSs p body, @@ -1134,13 +1136,13 @@ type GhciStmt id = Stmt id (LHsExpr id) -- The SyntaxExprs in here are used *only* for do-notation and monad -- comprehensions, which have rebindable syntax. Otherwise they are unused. --- | API Annotations when in qualifier lists or guards +-- | Exact print annotations when in qualifier lists or guards -- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnVbar', -- 'GHC.Parser.Annotation.AnnComma','GHC.Parser.Annotation.AnnThen', -- 'GHC.Parser.Annotation.AnnBy','GHC.Parser.Annotation.AnnBy', -- 'GHC.Parser.Annotation.AnnGroup','GHC.Parser.Annotation.AnnUsing' --- 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 StmtLR idL idR body -- body should always be (LHs**** idR) = LastStmt -- Always the last Stmt in ListComp, MonadComp, -- and (after the renamer, see GHC.Rename.Expr.checkLastStmt) DoExpr, MDoExpr @@ -1158,7 +1160,7 @@ data StmtLR idL idR body -- body should always be (LHs**** idR) -- See Note [Monad Comprehensions] -- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnLarrow' - -- 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 | BindStmt (XBindStmt idL idR body) -- ^ Post renaming has optional fail and bind / (>>=) operator. -- Post typechecking, also has multiplicity of the argument @@ -1192,7 +1194,7 @@ data StmtLR idL idR body -- body should always be (LHs**** idR) -- | - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnLet' -- '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 | LetStmt (XLetStmt idL idR body) (HsLocalBindsLR idL idR) -- ParStmts only occur in a list/monad comprehension @@ -1230,7 +1232,7 @@ data StmtLR idL idR body -- body should always be (LHs**** idR) -- Recursive statement (see Note [How RecStmt works] below) -- | - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnRec' - -- 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 | RecStmt { recS_ext :: XRecStmt idL idR body , recS_stmts :: XRec idR [LStmtLR idL idR body] diff --git a/compiler/Language/Haskell/Syntax/Extension.hs b/compiler/Language/Haskell/Syntax/Extension.hs index cd9804b7f9..892e93892d 100644 --- a/compiler/Language/Haskell/Syntax/Extension.hs +++ b/compiler/Language/Haskell/Syntax/Extension.hs @@ -117,9 +117,10 @@ SrcSpans everywhere. instead of `Located (HsExpr p)` or similar types, we will now have `XRec p (HsExpr p)` -XRec allows annotating certain points in the AST with extra information. This -maybe be source spans (for GHC), nothing (for TH), types (for HIE files), api -annotations (for exactprint) or anything else. +XRec allows annotating certain points in the AST with extra +information. This maybe be source spans (for GHC), nothing (for TH), +types (for HIE files), exact print annotations (for exactprint) or +anything else. This should hopefully bring us one step closer to sharing the AST between GHC and TH. diff --git a/compiler/Language/Haskell/Syntax/Pat.hs b/compiler/Language/Haskell/Syntax/Pat.hs index 86f56f7ad8..4417026478 100644 --- a/compiler/Language/Haskell/Syntax/Pat.hs +++ b/compiler/Language/Haskell/Syntax/Pat.hs @@ -49,7 +49,7 @@ type LPat p = XRec p (Pat p) -- -- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnBang' --- 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 Pat p = ------------ Simple patterns --------------- WildPat (XWildPat p) -- ^ Wildcard Pattern @@ -65,13 +65,13 @@ data Pat p (LPat p) -- ^ Lazy Pattern -- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnTilde' - -- 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 | AsPat (XAsPat p) (LIdP p) (LPat p) -- ^ As pattern -- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnAt' - -- 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 | ParPat (XParPat p) (LPat p) -- ^ Parenthesised pattern @@ -79,12 +79,12 @@ data Pat p -- ^ - '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 | BangPat (XBangPat p) (LPat p) -- ^ Bang pattern -- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnBang' - -- 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 ------------ Lists, tuples, arrays --------------- | ListPat (XListPat p) @@ -98,7 +98,7 @@ data Pat p -- - '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 | TuplePat (XTuplePat p) -- after typechecking, holds the types of the tuple components @@ -136,7 +136,7 @@ data Pat p -- '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 ------------ Constructor patterns --------------- | ConPat { @@ -149,7 +149,7 @@ data Pat p ------------ View patterns --------------- -- | - 'GHC.Parser.Annotation.AnnKeywordId' : '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 | ViewPat (XViewPat p) -- The overall type of the pattern -- (= the argument type of the view function) -- for hsPatType. @@ -161,7 +161,7 @@ data Pat p -- | - '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 | SplicePat (XSplicePat p) (HsSplice p) -- ^ Splice Pattern (Includes quasi-quotes) @@ -187,7 +187,7 @@ data Pat p -- -- - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnVal' @'+'@ - -- 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 | NPlusKPat (XNPlusKPat p) -- Type of overall pattern (LIdP p) -- n+k pattern (XRec p (HsOverLit p)) -- It'll always be an HsIntegral @@ -202,7 +202,7 @@ data Pat p ------------ Pattern type signatures --------------- -- | - 'GHC.Parser.Annotation.AnnKeywordId' : '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 | SigPat (XSigPat p) -- After typechecker: Type (LPat p) -- Pattern with a type signature (HsPatSigType (NoGhcTc p)) -- Signature can bind both @@ -274,7 +274,7 @@ type HsRecUpdField p = HsRecField' (AmbiguousFieldOcc p) (LHsExpr p) -- -- - 'GHC.Parser.Annotation.AnnKeywordId' : '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 data HsRecField' id arg = HsRecField { hsRecFieldAnn :: XHsRecField id, hsRecFieldLbl :: Located id, diff --git a/compiler/Language/Haskell/Syntax/Type.hs b/compiler/Language/Haskell/Syntax/Type.hs index 4263f9548c..f23072c04a 100644 --- a/compiler/Language/Haskell/Syntax/Type.hs +++ b/compiler/Language/Haskell/Syntax/Type.hs @@ -277,7 +277,7 @@ quantified in left-to-right order in kind signatures is nice since: -- | Located Haskell Context type LHsContext pass = XRec pass (HsContext pass) -- ^ 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnUnit' - -- 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 Context type HsContext pass = [LHsType pass] @@ -287,7 +287,7 @@ type LHsType pass = XRec pass (HsType pass) -- ^ May have 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnComma' 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 Kind type HsKind pass = HsType pass @@ -296,7 +296,7 @@ type HsKind pass = HsType pass type LHsKind pass = XRec pass (HsKind pass) -- ^ 'GHC.Parser.Annotation.AnnKeywordId' : '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 -------------------------------------------------- -- LHsQTyVars @@ -709,7 +709,7 @@ data HsTyVarBndr flag 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 | XTyVarBndr !(XXTyVarBndr pass) @@ -730,7 +730,7 @@ data HsType pass } -- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnForall', -- 'GHC.Parser.Annotation.AnnDot','GHC.Parser.Annotation.AnnDarrow' - -- 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" | HsQualTy -- See Note [HsType binders] { hst_xqual :: XQualTy pass @@ -746,14 +746,14 @@ data HsType pass -- See Note [Located RdrNames] in GHC.Hs.Expr -- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : None - -- 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 | HsAppTy (XAppTy pass) (LHsType pass) (LHsType pass) -- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : None - -- 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 | HsAppKindTy (XAppKindTy pass) -- type level type app (LHsType pass) @@ -765,14 +765,14 @@ data HsType pass (LHsType pass) -- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : '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 | HsListTy (XListTy pass) (LHsType pass) -- Element type -- ^ - '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 | HsTupleTy (XTupleTy pass) HsTupleSort @@ -780,20 +780,20 @@ data HsType pass -- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnOpen' @'(' or '(#'@, -- 'GHC.Parser.Annotation.AnnClose' @')' or '#)'@ - -- 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 | HsSumTy (XSumTy pass) [LHsType pass] -- Element types (length gives arity) -- ^ - '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 | HsOpTy (XOpTy pass) (LHsType pass) (LIdP pass) (LHsType pass) -- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : None - -- 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 | HsParTy (XParTy pass) (LHsType pass) -- See Note [Parens in HsSyn] in GHC.Hs.Expr @@ -803,7 +803,7 @@ data HsType 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 | HsIParamTy (XIParamTy pass) (XRec pass HsIPName) -- (?x :: ty) @@ -814,7 +814,7 @@ data HsType pass -- -- - 'GHC.Parser.Annotation.AnnKeywordId' : '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 | HsStarTy (XStarTy pass) Bool -- Is this the Unicode variant? @@ -830,20 +830,20 @@ data HsType 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 | HsSpliceTy (XSpliceTy pass) (HsSplice pass) -- Includes quasi-quotes -- ^ - '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 | HsDocTy (XDocTy pass) (LHsType pass) LHsDocString -- A documented type -- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : None - -- 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 | HsBangTy (XBangTy pass) HsSrcBang (LHsType pass) -- Bang-style type annotations @@ -852,14 +852,14 @@ data HsType pass -- 'GHC.Parser.Annotation.AnnClose' @'#-}'@ -- 'GHC.Parser.Annotation.AnnBang' @\'!\'@ - -- 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 | HsRecTy (XRecTy pass) [LConDeclField pass] -- Only in data type declarations -- ^ - '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 | HsExplicitListTy -- A promoted explicit list (XExplicitListTy pass) @@ -868,7 +868,7 @@ data HsType 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 | HsExplicitTupleTy -- A promoted explicit tuple (XExplicitTupleTy pass) @@ -876,18 +876,18 @@ data HsType 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 | HsTyLit (XTyLit pass) HsTyLit -- A promoted numeric literal. -- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : None - -- 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 | HsWildCardTy (XWildCardTy pass) -- A type wildcard -- See Note [The wildcard story for types] -- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : None - -- 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 -- For adding new constructors via Trees that Grow | XHsType @@ -1043,7 +1043,7 @@ type LConDeclField pass = XRec pass (ConDeclField pass) -- ^ May have 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnComma' 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 -- | Constructor Declaration Field data ConDeclField pass -- Record fields have Haddock docs on them @@ -1054,7 +1054,7 @@ data ConDeclField pass -- Record fields have Haddock docs on them cd_fld_doc :: Maybe LHsDocString } -- ^ - 'GHC.Parser.Annotation.AnnKeywordId' : '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 | XConDeclField !(XXConDeclField pass) -- | Describes the arguments to a data constructor. This is a common |