- HsDecl(..), LHsDecl, TyClDecl(..), LTyClDecl,
- InstDecl(..), LInstDecl, DerivDecl(..), LDerivDecl, NewOrData(..),
- FamilyFlavour(..),
- RuleDecl(..), LRuleDecl, RuleBndr(..),
- DefaultDecl(..), LDefaultDecl, SpliceDecl(..),
- ForeignDecl(..), LForeignDecl, ForeignImport(..), ForeignExport(..),
- CImportSpec(..), FoType(..),
- ConDecl(..), ResType(..), ConDeclField(..), LConDecl,
- HsConDeclDetails, hsConDeclArgTys,
- DocDecl(..), LDocDecl, docDeclDoc,
- WarnDecl(..), LWarnDecl,
- HsGroup(..), emptyRdrGroup, emptyRnGroup, appendGroups,
- tcdName, tyClDeclNames, tyClDeclTyVars,
- isClassDecl, isSynDecl, isDataDecl, isTypeDecl, isFamilyDecl,
- isFamInstDecl,
- countTyClDecls,
- instDeclATs,
- collectRuleBndrSigTys,
+ -- * Toplevel declarations
+ HsDecl(..), LHsDecl,
+ -- ** Class or type declarations
+ TyClDecl(..), LTyClDecl,
+ isClassDecl, isSynDecl, isDataDecl, isTypeDecl, isFamilyDecl,
+ isFamInstDecl, tcdName, tyClDeclTyVars,
+ countTyClDecls,
+ -- ** Instance declarations
+ InstDecl(..), LInstDecl, NewOrData(..), FamilyFlavour(..),
+ instDeclATs,
+ -- ** Standalone deriving declarations
+ DerivDecl(..), LDerivDecl,
+ -- ** @RULE@ declarations
+ RuleDecl(..), LRuleDecl, RuleBndr(..),
+ collectRuleBndrSigTys,
+ -- ** @VECTORISE@ declarations
+ VectDecl(..), LVectDecl,
+ -- ** @default@ declarations
+ DefaultDecl(..), LDefaultDecl,
+ -- ** Top-level template haskell splice
+ SpliceDecl(..),
+ -- ** Foreign function interface declarations
+ ForeignDecl(..), LForeignDecl, ForeignImport(..), ForeignExport(..),
+ CImportSpec(..),
+ -- ** Data-constructor declarations
+ ConDecl(..), LConDecl, ResType(..),
+ HsConDeclDetails, hsConDeclArgTys,
+ -- ** Document comments
+ DocDecl(..), LDocDecl, docDeclDoc,
+ -- ** Deprecations
+ WarnDecl(..), LWarnDecl,
+ -- ** Annotations
+ AnnDecl(..), LAnnDecl,
+ AnnProvenance(..), annProvenanceName_maybe, modifyAnnProvenanceNameM,
+
+ -- * Grouping
+ HsGroup(..), emptyRdrGroup, emptyRnGroup, appendGroups