HsDecls

ghc-8.4.4: The GHC API

Safe Haskell | None
Language | Haskell2010

HsDecls

Contents

- Toplevel declarations
  - Class or type declarations
  - Instance declarations
  - Standalone deriving declarations
  - `RULE` declarations
  - `VECTORISE` declarations
  - `default` declarations
  - Template haskell declaration splice
  - Foreign function interface declarations
  - Data-constructor declarations
  - Document comments
  - Deprecations
  - Annotations
  - Role annotations
  - Injective type families
- Grouping

Description

Abstract syntax of global declarations.

Definitions for: `SynDecl` and `ConDecl`, `ClassDecl`, `InstDecl`, `DefaultDecl` and `ForeignDecl`.

Synopsis

- data HsDecl id
  - = TyClD (TyClDecl id)
  - | InstD (InstDecl id)
  - | DerivD (DerivDecl id)
  - | ValD (HsBind id)
  - | SigD (Sig id)
  - | DefD (DefaultDecl id)
  - | ForD (ForeignDecl id)
  - | WarningD (WarnDecls id)
  - | AnnD (AnnDecl id)
  - | RuleD (RuleDecls id)
  - | VectD (VectDecl id)
  - | SpliceD (SpliceDecl id)
  - | DocD DocDecl
  - | RoleAnnotD (RoleAnnotDecl id)
- type LHsDecl id = Located (HsDecl id)
- data HsDataDefn pass = HsDataDefn {
  - dd_ND :: NewOrData
  - dd_ctxt :: LHsContext pass
  - dd_cType :: Maybe (Located CType)
  - dd_kindSig :: Maybe (LHsKind pass)
  - dd_cons :: [LConDecl pass]
  - dd_derivs :: HsDeriving pass
  }
- type HsDeriving pass = Located [LHsDerivingClause pass]
- data HsDerivingClause pass = HsDerivingClause {
  - deriv_clause_strategy :: Maybe (Located DerivStrategy)
  - deriv_clause_tys :: Located [LHsSigType pass]
  }
- type LHsDerivingClause pass = Located (HsDerivingClause pass)
- data TyClDecl pass
  - = FamDecl {
    - tcdFam :: FamilyDecl pass
    }
  - | SynDecl {
    - tcdLName :: Located (IdP pass)
    - tcdTyVars :: LHsQTyVars pass
    - tcdFixity :: LexicalFixity
    - tcdRhs :: LHsType pass
    - tcdFVs :: PostRn pass NameSet
    }
  - | DataDecl {
    - tcdLName :: Located (IdP pass)
    - tcdTyVars :: LHsQTyVars pass
    - tcdFixity :: LexicalFixity
    - tcdDataDefn :: HsDataDefn pass
    - tcdDataCusk :: PostRn pass Bool
    - tcdFVs :: PostRn pass NameSet
    }
  - | ClassDecl {
    - tcdCtxt :: LHsContext pass
    - tcdLName :: Located (IdP pass)
    - tcdTyVars :: LHsQTyVars pass
    - tcdFixity :: LexicalFixity
    - tcdFDs :: [Located (FunDep (Located (IdP pass)))]
    - tcdSigs :: [LSig pass]
    - tcdMeths :: LHsBinds pass
    - tcdATs :: [LFamilyDecl pass]
    - tcdATDefs :: [LTyFamDefltEqn pass]
    - tcdDocs :: [LDocDecl]
    - tcdFVs :: PostRn pass NameSet
    }
- type LTyClDecl pass = Located (TyClDecl pass)
- data TyClGroup pass = TyClGroup {
  - group_tyclds :: [LTyClDecl pass]
  - group_roles :: [LRoleAnnotDecl pass]
  - group_instds :: [LInstDecl pass]
  }
- mkTyClGroup :: [LTyClDecl pass] -> [LInstDecl pass] -> TyClGroup pass
- emptyTyClGroup :: TyClGroup pass
- tyClGroupTyClDecls :: [TyClGroup pass] -> [LTyClDecl pass]
- tyClGroupInstDecls :: [TyClGroup pass] -> [LInstDecl pass]
- tyClGroupRoleDecls :: [TyClGroup pass] -> [LRoleAnnotDecl pass]
- isClassDecl :: TyClDecl pass -> Bool
- isDataDecl :: TyClDecl pass -> Bool
- isSynDecl :: TyClDecl pass -> Bool
- tcdName :: TyClDecl pass -> IdP pass
- isFamilyDecl :: TyClDecl pass -> Bool
- isTypeFamilyDecl :: TyClDecl pass -> Bool
- isDataFamilyDecl :: TyClDecl pass -> Bool
- isOpenTypeFamilyInfo :: FamilyInfo pass -> Bool
- isClosedTypeFamilyInfo :: FamilyInfo pass -> Bool
- tyFamInstDeclName :: TyFamInstDecl pass -> IdP pass
- tyFamInstDeclLName :: TyFamInstDecl pass -> Located (IdP pass)
- countTyClDecls :: [TyClDecl pass] -> (Int, Int, Int, Int, Int)
- pprTyClDeclFlavour :: TyClDecl a -> SDoc
- tyClDeclLName :: TyClDecl pass -> Located (IdP pass)
- tyClDeclTyVars :: TyClDecl pass -> LHsQTyVars pass
- hsDeclHasCusk :: TyClDecl GhcRn -> Bool
- famDeclHasCusk :: Maybe Bool -> FamilyDecl pass -> Bool
- data FamilyDecl pass = FamilyDecl {
  - fdInfo :: FamilyInfo pass
  - fdLName :: Located (IdP pass)
  - fdTyVars :: LHsQTyVars pass
  - fdFixity :: LexicalFixity
  - fdResultSig :: LFamilyResultSig pass
  - fdInjectivityAnn :: Maybe (LInjectivityAnn pass)
  }
- type LFamilyDecl pass = Located (FamilyDecl pass)
- data InstDecl pass
  - = ClsInstD {
    - cid_inst :: ClsInstDecl pass
    }
  - | DataFamInstD {
    - dfid_inst :: DataFamInstDecl pass
    }
  - | TyFamInstD {
    - tfid_inst :: TyFamInstDecl pass
    }
- type LInstDecl pass = Located (InstDecl pass)
- data NewOrData
  - = NewType
  - | DataType
- data FamilyInfo pass
  - = DataFamily
  - | OpenTypeFamily
  - | ClosedTypeFamily (Maybe [LTyFamInstEqn pass])
- newtype TyFamInstDecl pass = TyFamInstDecl {
  - tfid_eqn :: TyFamInstEqn pass
  }
- type LTyFamInstDecl pass = Located (TyFamInstDecl pass)
- instDeclDataFamInsts :: [LInstDecl pass] -> [DataFamInstDecl pass]
- newtype DataFamInstDecl pass = DataFamInstDecl {
  - dfid_eqn :: FamInstEqn pass (HsDataDefn pass)
  }
- type LDataFamInstDecl pass = Located (DataFamInstDecl pass)
- pprDataFamInstFlavour :: DataFamInstDecl pass -> SDoc
- pprFamInstLHS :: (SourceTextX pass, OutputableBndrId pass) => Located (IdP pass) -> HsTyPats pass -> LexicalFixity -> HsContext pass -> Maybe (LHsKind pass) -> SDoc
- type FamInstEqn pass rhs = HsImplicitBndrs pass (FamEqn pass (HsTyPats pass) rhs)
- type LFamInstEqn pass rhs = Located (FamInstEqn pass rhs)
- data FamEqn pass pats rhs = FamEqn {
  - feqn_tycon :: Located (IdP pass)
  - feqn_pats :: pats
  - feqn_fixity :: LexicalFixity
  - feqn_rhs :: rhs
  }
- type TyFamInstEqn pass = FamInstEqn pass (LHsType pass)
- type LTyFamInstEqn pass = Located (TyFamInstEqn pass)
- type TyFamDefltEqn pass = FamEqn pass (LHsQTyVars pass) (LHsType pass)
- type LTyFamDefltEqn pass = Located (TyFamDefltEqn pass)
- type HsTyPats pass = [LHsType pass]
- type LClsInstDecl pass = Located (ClsInstDecl pass)
- data ClsInstDecl pass = ClsInstDecl {
  - cid_poly_ty :: LHsSigType pass
  - cid_binds :: LHsBinds pass
  - cid_sigs :: [LSig pass]
  - cid_tyfam_insts :: [LTyFamInstDecl pass]
  - cid_datafam_insts :: [LDataFamInstDecl pass]
  - cid_overlap_mode :: Maybe (Located OverlapMode)
  }
- data DerivDecl pass = DerivDecl {
  - deriv_type :: LHsSigType pass
  - deriv_strategy :: Maybe (Located DerivStrategy)
  - deriv_overlap_mode :: Maybe (Located OverlapMode)
  }
- type LDerivDecl pass = Located (DerivDecl pass)
- type LRuleDecls pass = Located (RuleDecls pass)
- data RuleDecls pass = HsRules {
  - rds_src :: SourceText
  - rds_rules :: [LRuleDecl pass]
  }
- data RuleDecl pass = HsRule (Located (SourceText, RuleName)) Activation [LRuleBndr pass] (Located (HsExpr pass)) (PostRn pass NameSet) (Located (HsExpr pass)) (PostRn pass NameSet)
- type LRuleDecl pass = Located (RuleDecl pass)
- data RuleBndr pass
  - = RuleBndr (Located (IdP pass))
  - | RuleBndrSig (Located (IdP pass)) (LHsSigWcType pass)
- type LRuleBndr pass = Located (RuleBndr pass)
- collectRuleBndrSigTys :: [RuleBndr pass] -> [LHsSigWcType pass]
- flattenRuleDecls :: [LRuleDecls pass] -> [LRuleDecl pass]
- pprFullRuleName :: Located (SourceText, RuleName) -> SDoc
- data VectDecl pass
  - = HsVect SourceText (Located (IdP pass)) (LHsExpr pass)
  - | HsNoVect SourceText (Located (IdP pass))
  - | HsVectTypeIn SourceText Bool (Located (IdP pass)) (Maybe (Located (IdP pass)))
  - | HsVectTypeOut Bool TyCon (Maybe TyCon)
  - | HsVectClassIn SourceText (Located (IdP pass))
  - | HsVectClassOut Class
  - | HsVectInstIn (LHsSigType pass)
  - | HsVectInstOut ClsInst
- type LVectDecl pass = Located (VectDecl pass)
- lvectDeclName :: NamedThing (IdP pass) => LVectDecl pass -> Name
- lvectInstDecl :: LVectDecl pass -> Bool
- data DefaultDecl pass = DefaultDecl [LHsType pass]
- type LDefaultDecl pass = Located (DefaultDecl pass)
- data SpliceExplicitFlag
  - = ExplicitSplice
  - | ImplicitSplice
- data SpliceDecl id = SpliceDecl (Located (HsSplice id)) SpliceExplicitFlag
- type LSpliceDecl pass = Located (SpliceDecl pass)
- data ForeignDecl pass
  - = ForeignImport {
    - fd_name :: Located (IdP pass)
    - fd_sig_ty :: LHsSigType pass
    - fd_co :: PostTc pass Coercion
    - fd_fi :: ForeignImport
    }
  - | ForeignExport {
    - fd_name :: Located (IdP pass)
    - fd_sig_ty :: LHsSigType pass
    - fd_co :: PostTc pass Coercion
    - fd_fe :: ForeignExport
    }
- type LForeignDecl pass = Located (ForeignDecl pass)
- data ForeignImport = CImport (Located CCallConv) (Located Safety) (Maybe Header) CImportSpec (Located SourceText)
- data ForeignExport = CExport (Located CExportSpec) (Located SourceText)
- noForeignImportCoercionYet :: PlaceHolder
- noForeignExportCoercionYet :: PlaceHolder
- data CImportSpec
  - = CLabel CLabelString
  - | CFunction CCallTarget
  - | CWrapper
- data ConDecl pass
  - = ConDeclGADT {
    - con_names :: [Located (IdP pass)]
    - con_type :: LHsSigType pass
    - con_doc :: Maybe LHsDocString
    }
  - | ConDeclH98 {
    - con_name :: Located (IdP pass)
    - con_qvars :: Maybe (LHsQTyVars pass)
    - con_cxt :: Maybe (LHsContext pass)
    - con_details :: HsConDeclDetails pass
    - con_doc :: Maybe LHsDocString
    }
- type LConDecl pass = Located (ConDecl pass)
- type HsConDeclDetails pass = HsConDetails (LBangType pass) (Located [LConDeclField pass])
- hsConDeclArgTys :: HsConDeclDetails pass -> [LBangType pass]
- getConNames :: ConDecl pass -> [Located (IdP pass)]
- getConDetails :: ConDecl pass -> HsConDeclDetails pass
- gadtDeclDetails :: LHsSigType pass -> (HsConDeclDetails pass, LHsType pass, LHsContext pass, [LHsTyVarBndr pass])
- data DocDecl
  - = DocCommentNext HsDocString
  - | DocCommentPrev HsDocString
  - | DocCommentNamed String HsDocString
  - | DocGroup Int HsDocString
- type LDocDecl = Located DocDecl
- docDeclDoc :: DocDecl -> HsDocString
- data WarnDecl pass = Warning [Located (IdP pass)] WarningTxt
- type LWarnDecl pass = Located (WarnDecl pass)
- data WarnDecls pass = Warnings {
  - wd_src :: SourceText
  - wd_warnings :: [LWarnDecl pass]
  }
- type LWarnDecls pass = Located (WarnDecls pass)
- data AnnDecl pass = HsAnnotation SourceText (AnnProvenance (IdP pass)) (Located (HsExpr pass))
- type LAnnDecl pass = Located (AnnDecl pass)
- data AnnProvenance name
  - = ValueAnnProvenance (Located name)
  - | TypeAnnProvenance (Located name)
  - | ModuleAnnProvenance
- annProvenanceName_maybe :: AnnProvenance name -> Maybe name
- data RoleAnnotDecl pass = RoleAnnotDecl (Located (IdP pass)) [Located (Maybe Role)]
- type LRoleAnnotDecl pass = Located (RoleAnnotDecl pass)
- roleAnnotDeclName :: RoleAnnotDecl pass -> IdP pass
- data FamilyResultSig pass
  - = NoSig
  - | KindSig (LHsKind pass)
  - | TyVarSig (LHsTyVarBndr pass)
- type LFamilyResultSig pass = Located (FamilyResultSig pass)
- data InjectivityAnn pass = InjectivityAnn (Located (IdP pass)) [Located (IdP pass)]
- type LInjectivityAnn pass = Located (InjectivityAnn pass)
- resultVariableName :: FamilyResultSig a -> Maybe (IdP a)
- data HsGroup id = HsGroup {
  - hs_valds :: HsValBinds id
  - hs_splcds :: [LSpliceDecl id]
  - hs_tyclds :: [TyClGroup id]
  - hs_derivds :: [LDerivDecl id]
  - hs_fixds :: [LFixitySig id]
  - hs_defds :: [LDefaultDecl id]
  - hs_fords :: [LForeignDecl id]
  - hs_warnds :: [LWarnDecls id]
  - hs_annds :: [LAnnDecl id]
  - hs_ruleds :: [LRuleDecls id]
  - hs_vects :: [LVectDecl id]
  - hs_docs :: [LDocDecl]
  }
- emptyRdrGroup :: HsGroup a
- emptyRnGroup :: HsGroup a
- appendGroups :: HsGroup a -> HsGroup a -> HsGroup a
- hsGroupInstDecls :: HsGroup id -> [LInstDecl id]

# Toplevel declarations

data HsDecl id Source #

A Haskell Declaration

Constructors

TyClD (TyClDecl id) | Type or Class Declaration
InstD (InstDecl id) | Instance declaration
DerivD (DerivDecl id) | Deriving declaration
ValD (HsBind id) | Value declaration
SigD (Sig id) | Signature declaration
DefD (DefaultDecl id) | 'default' declaration
ForD (ForeignDecl id) | Foreign declaration
WarningD (WarnDecls id) | Warning declaration
AnnD (AnnDecl id) | Annotation declaration
RuleD (RuleDecls id) | Rule declaration
VectD (VectDecl id) | Vectorise declaration
SpliceD (SpliceDecl id) | Splice declaration (Includes quasi-quotes)
DocD DocDecl | Documentation comment declaration
RoleAnnotD (RoleAnnotDecl id) | Role annotation declaration

Instances

DataId id => Data (HsDecl id) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsDecl id -> c (HsDecl id) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsDecl id) Source # toConstr :: HsDecl id -> Constr Source # dataTypeOf :: HsDecl id -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsDecl id)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsDecl id)) Source # gmapT :: (forall b. Data b => b -> b) -> HsDecl id -> HsDecl id Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsDecl id -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsDecl id -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsDecl id -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsDecl id -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsDecl id -> m (HsDecl id) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsDecl id -> m (HsDecl id) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsDecl id -> m (HsDecl id) Source #
(SourceTextX pass, OutputableBndrId pass) => Outputable (HsDecl pass) Source # |
Instance details Defined in HsDecls Methods ppr :: HsDecl pass -> SDoc Source # pprPrec :: Rational -> HsDecl pass -> SDoc Source #

type LHsDecl id Source #

Arguments

= Located (HsDecl id) | When in a list this may have `AnnKeywordId` : `AnnSemi`

data HsDataDefn pass Source #

Haskell Data type Definition

Constructors

HsDataDefn | Declares a data type or newtype, giving its constructors `data/newtype T a = constrs data/newtype instance T [a] = constrs`
Fields dd_ND :: NewOrData dd_ctxt :: LHsContext pass Context dd_cType :: Maybe (Located CType) dd_kindSig :: Maybe (LHsKind pass) Optional kind signature. `(Just k)` for a GADT-style `data`, or `data instance` decl, with explicit kind sig Always `Nothing` for H98-syntax decls dd_cons :: [LConDecl pass] Data constructors For `data T a = T1 | T2 a` the `LConDecl`s all have `ConDeclH98`. For `data T a where { T1 :: T a }` the `LConDecls` all have `ConDeclGADT`. dd_derivs :: HsDeriving pass Optional 'deriving' claues

Instances

DataId id => Data (HsDataDefn id) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsDataDefn id -> c (HsDataDefn id) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsDataDefn id) Source # toConstr :: HsDataDefn id -> Constr Source # dataTypeOf :: HsDataDefn id -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsDataDefn id)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsDataDefn id)) Source # gmapT :: (forall b. Data b => b -> b) -> HsDataDefn id -> HsDataDefn id Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsDataDefn id -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsDataDefn id -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsDataDefn id -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsDataDefn id -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsDataDefn id -> m (HsDataDefn id) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsDataDefn id -> m (HsDataDefn id) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsDataDefn id -> m (HsDataDefn id) Source #
(SourceTextX pass, OutputableBndrId pass) => Outputable (HsDataDefn pass) Source # |
Instance details Defined in HsDecls Methods ppr :: HsDataDefn pass -> SDoc Source # pprPrec :: Rational -> HsDataDefn pass -> SDoc Source #

type HsDeriving pass Source #

Arguments

= Located [LHsDerivingClause pass] | The optional `deriving` clauses of a data declaration. Clauses is plural because one can specify multiple deriving clauses using the `-XDerivingStrategies` language extension. The list of `LHsDerivingClause`s corresponds to exactly what the user requested to derive, in order. If no deriving clauses were specified, the list is empty.

Haskell Deriving clause

data HsDerivingClause pass Source #

A single `deriving` clause of a data declaration.

- `AnnKeywordId` : `AnnDeriving`, `AnnStock`, `AnnAnyClass`, `AnnNewtype`, `AnnOpen`,`AnnClose`

Constructors

HsDerivingClause |
- Fields deriv_clause_strategy :: Maybe (Located DerivStrategy) The user-specified strategy (if any) to use when deriving `deriv_clause_tys`. deriv_clause_tys :: Located [LHsSigType pass] The types to derive. It uses `LHsSigType`s because, with `-XGeneralizedNewtypeDeriving`, we can mention type variables that aren't bound by the datatype, e.g.
      data T b = ... deriving (C [a])
should produce a derived instance for `C [a] (T b)`.

Instances

DataId id => Data (HsDerivingClause id) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsDerivingClause id -> c (HsDerivingClause id) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsDerivingClause id) Source # toConstr :: HsDerivingClause id -> Constr Source # dataTypeOf :: HsDerivingClause id -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsDerivingClause id)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsDerivingClause id)) Source # gmapT :: (forall b. Data b => b -> b) -> HsDerivingClause id -> HsDerivingClause id Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsDerivingClause id -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsDerivingClause id -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsDerivingClause id -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsDerivingClause id -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsDerivingClause id -> m (HsDerivingClause id) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsDerivingClause id -> m (HsDerivingClause id) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsDerivingClause id -> m (HsDerivingClause id) Source #
(SourceTextX pass, OutputableBndrId pass) => Outputable (HsDerivingClause pass) Source # |
Instance details Defined in HsDecls Methods ppr :: HsDerivingClause pass -> SDoc Source # pprPrec :: Rational -> HsDerivingClause pass -> SDoc Source #

type LHsDerivingClause pass = Located (HsDerivingClause pass) Source #

## Class or type declarations

data TyClDecl pass Source #

A type or class declaration.

Constructors

FamDecl |
    type/data family T :: *->*
`AnnKeywordId` : `AnnType`, `AnnData`, `AnnFamily`,`AnnDcolon`, `AnnWhere`,`AnnOpenP`, `AnnDcolon`,`AnnCloseP`, `AnnEqual`,`AnnRarrow`, `AnnVbar`
Fields tcdFam :: FamilyDecl pass
SynDecl | `type` declaration `AnnKeywordId` : `AnnType`, `AnnEqual`,
Fields tcdLName :: Located (IdP pass) Type constructor tcdTyVars :: LHsQTyVars pass Type variables; for an associated type these include outer binders tcdFixity :: LexicalFixity Fixity used in the declaration tcdRhs :: LHsType pass RHS of type declaration tcdFVs :: PostRn pass NameSet
DataDecl | `data` declaration `AnnKeywordId` : `AnnData`, `AnnFamily`, `AnnNewType`, `AnnNewType`,`AnnDcolon` `AnnWhere`,
Fields tcdLName :: Located (IdP pass) Type constructor tcdTyVars :: LHsQTyVars pass Type variables; for an associated type these include outer binders tcdFixity :: LexicalFixity Fixity used in the declaration tcdDataDefn :: HsDataDefn pass tcdDataCusk :: PostRn pass Bool does this have a CUSK? tcdFVs :: PostRn pass NameSet
ClassDecl | `AnnKeywordId` : `AnnClass`, `AnnWhere`,`AnnOpen`, `AnnClose` The tcdFDs will have `AnnVbar`, `AnnComma` `AnnRarrow`
Fields tcdCtxt :: LHsContext pass Context... tcdLName :: Located (IdP pass) Type constructor tcdTyVars :: LHsQTyVars pass Type variables; for an associated type these include outer binders tcdFixity :: LexicalFixity Fixity used in the declaration tcdFDs :: [Located (FunDep (Located (IdP pass)))] Functional deps tcdSigs :: [LSig pass] Methods' signatures tcdMeths :: LHsBinds pass Default methods tcdATs :: [LFamilyDecl pass] Associated types; tcdATDefs :: [LTyFamDefltEqn pass] Associated type defaults tcdDocs :: [LDocDecl] Haddock docs tcdFVs :: PostRn pass NameSet

Instances

DataId id => Data (TyClDecl id) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TyClDecl id -> c (TyClDecl id) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (TyClDecl id) Source # toConstr :: TyClDecl id -> Constr Source # dataTypeOf :: TyClDecl id -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (TyClDecl id)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (TyClDecl id)) Source # gmapT :: (forall b. Data b => b -> b) -> TyClDecl id -> TyClDecl id Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyClDecl id -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyClDecl id -> r Source # gmapQ :: (forall d. Data d => d -> u) -> TyClDecl id -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> TyClDecl id -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TyClDecl id -> m (TyClDecl id) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TyClDecl id -> m (TyClDecl id) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TyClDecl id -> m (TyClDecl id) Source #
(SourceTextX pass, OutputableBndrId pass) => Outputable (TyClDecl pass) Source # |
Instance details Defined in HsDecls Methods ppr :: TyClDecl pass -> SDoc Source # pprPrec :: Rational -> TyClDecl pass -> SDoc Source #

type LTyClDecl pass = Located (TyClDecl pass) Source #

Located Declaration of a Type or Class

data TyClGroup pass Source #

Type or Class Group

Constructors

TyClGroup |
Fields group_tyclds :: [LTyClDecl pass] group_roles :: [LRoleAnnotDecl pass] group_instds :: [LInstDecl pass]

Instances

DataId id => Data (TyClGroup id) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TyClGroup id -> c (TyClGroup id) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (TyClGroup id) Source # toConstr :: TyClGroup id -> Constr Source # dataTypeOf :: TyClGroup id -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (TyClGroup id)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (TyClGroup id)) Source # gmapT :: (forall b. Data b => b -> b) -> TyClGroup id -> TyClGroup id Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyClGroup id -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyClGroup id -> r Source # gmapQ :: (forall d. Data d => d -> u) -> TyClGroup id -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> TyClGroup id -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TyClGroup id -> m (TyClGroup id) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TyClGroup id -> m (TyClGroup id) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TyClGroup id -> m (TyClGroup id) Source #
(SourceTextX pass, OutputableBndrId pass) => Outputable (TyClGroup pass) Source # |
Instance details Defined in HsDecls Methods ppr :: TyClGroup pass -> SDoc Source # pprPrec :: Rational -> TyClGroup pass -> SDoc Source #

mkTyClGroup :: [LTyClDecl pass] -> [LInstDecl pass] -> TyClGroup pass Source #

emptyTyClGroup :: TyClGroup pass Source #

tyClGroupTyClDecls :: [TyClGroup pass] -> [LTyClDecl pass] Source #

tyClGroupInstDecls :: [TyClGroup pass] -> [LInstDecl pass] Source #

tyClGroupRoleDecls :: [TyClGroup pass] -> [LRoleAnnotDecl pass] Source #

isClassDecl :: TyClDecl pass -> Bool Source #

type class

isDataDecl :: TyClDecl pass -> Bool Source #

`True` = argument is a `data`/`newtype` declaration.

isSynDecl :: TyClDecl pass -> Bool Source #

type or type instance declaration

tcdName :: TyClDecl pass -> IdP pass Source #

isFamilyDecl :: TyClDecl pass -> Bool Source #

type/data family declaration

isTypeFamilyDecl :: TyClDecl pass -> Bool Source #

type family declaration

isDataFamilyDecl :: TyClDecl pass -> Bool Source #

data family declaration

isOpenTypeFamilyInfo :: FamilyInfo pass -> Bool Source #

open type family info

isClosedTypeFamilyInfo :: FamilyInfo pass -> Bool Source #

closed type family info

tyFamInstDeclName :: TyFamInstDecl pass -> IdP pass Source #

tyFamInstDeclLName :: TyFamInstDecl pass -> Located (IdP pass) Source #

countTyClDecls :: [TyClDecl pass] -> (Int, Int, Int, Int, Int) Source #

pprTyClDeclFlavour :: TyClDecl a -> SDoc Source #

tyClDeclLName :: TyClDecl pass -> Located (IdP pass) Source #

tyClDeclTyVars :: TyClDecl pass -> LHsQTyVars pass Source #

hsDeclHasCusk :: TyClDecl GhcRn -> Bool Source #

Does this declaration have a complete, user-supplied kind signature? See Note [Complete user-supplied kind signatures]

famDeclHasCusk Source #

Arguments

:: Maybe Bool | if associated, does the enclosing class have a CUSK?
-> FamilyDecl pass |
-> Bool |

Does this family declaration have a complete, user-supplied kind signature?

data FamilyDecl pass Source #

type Family Declaration

Constructors

FamilyDecl | `AnnKeywordId` : `AnnType`, `AnnData`, `AnnFamily`, `AnnWhere`, `AnnOpenP`, `AnnDcolon`, `AnnCloseP`, `AnnEqual`, `AnnRarrow`, `AnnVbar`
Fields fdInfo :: FamilyInfo pass fdLName :: Located (IdP pass) fdTyVars :: LHsQTyVars pass fdFixity :: LexicalFixity fdResultSig :: LFamilyResultSig pass fdInjectivityAnn :: Maybe (LInjectivityAnn pass)

Instances

DataId id => Data (FamilyDecl id) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FamilyDecl id -> c (FamilyDecl id) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (FamilyDecl id) Source # toConstr :: FamilyDecl id -> Constr Source # dataTypeOf :: FamilyDecl id -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (FamilyDecl id)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (FamilyDecl id)) Source # gmapT :: (forall b. Data b => b -> b) -> FamilyDecl id -> FamilyDecl id Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FamilyDecl id -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FamilyDecl id -> r Source # gmapQ :: (forall d. Data d => d -> u) -> FamilyDecl id -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> FamilyDecl id -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FamilyDecl id -> m (FamilyDecl id) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FamilyDecl id -> m (FamilyDecl id) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FamilyDecl id -> m (FamilyDecl id) Source #
(SourceTextX pass, OutputableBndrId pass) => Outputable (FamilyDecl pass) Source # |
Instance details Defined in HsDecls Methods ppr :: FamilyDecl pass -> SDoc Source # pprPrec :: Rational -> FamilyDecl pass -> SDoc Source #

type LFamilyDecl pass = Located (FamilyDecl pass) Source #

Located type Family Declaration

## Instance declarations

data InstDecl pass Source #

Instance Declaration

Constructors

ClsInstD |
Fields cid_inst :: ClsInstDecl pass
DataFamInstD |
Fields dfid_inst :: DataFamInstDecl pass
TyFamInstD |
Fields tfid_inst :: TyFamInstDecl pass

Instances

DataId id => Data (InstDecl id) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> InstDecl id -> c (InstDecl id) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (InstDecl id) Source # toConstr :: InstDecl id -> Constr Source # dataTypeOf :: InstDecl id -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (InstDecl id)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (InstDecl id)) Source # gmapT :: (forall b. Data b => b -> b) -> InstDecl id -> InstDecl id Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InstDecl id -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InstDecl id -> r Source # gmapQ :: (forall d. Data d => d -> u) -> InstDecl id -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> InstDecl id -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> InstDecl id -> m (InstDecl id) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InstDecl id -> m (InstDecl id) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InstDecl id -> m (InstDecl id) Source #
(SourceTextX pass, OutputableBndrId pass) => Outputable (InstDecl pass) Source # |
Instance details Defined in HsDecls Methods ppr :: InstDecl pass -> SDoc Source # pprPrec :: Rational -> InstDecl pass -> SDoc Source #

type LInstDecl pass = Located (InstDecl pass) Source #

Located Instance Declaration

data NewOrData Source #

Constructors

NewType |
    newtype Blah ...
DataType |
    data Blah ...

Instances

Eq NewOrData Source # |
Instance details Defined in HsDecls Methods (==) :: NewOrData -> NewOrData -> Bool # (/=) :: NewOrData -> NewOrData -> Bool #
Data NewOrData Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NewOrData -> c NewOrData Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NewOrData Source # toConstr :: NewOrData -> Constr Source # dataTypeOf :: NewOrData -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NewOrData) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NewOrData) Source # gmapT :: (forall b. Data b => b -> b) -> NewOrData -> NewOrData Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NewOrData -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NewOrData -> r Source # gmapQ :: (forall d. Data d => d -> u) -> NewOrData -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> NewOrData -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NewOrData -> m NewOrData Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NewOrData -> m NewOrData Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NewOrData -> m NewOrData Source #
Outputable NewOrData Source # |
Instance details Defined in HsDecls Methods ppr :: NewOrData -> SDoc Source # pprPrec :: Rational -> NewOrData -> SDoc Source #

data FamilyInfo pass Source #

Constructors

DataFamily |
OpenTypeFamily |
ClosedTypeFamily (Maybe [LTyFamInstEqn pass]) | `Nothing` if we're in an hs-boot file and the user said "type family Foo x where .."

Instances

DataId pass => Data (FamilyInfo pass) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FamilyInfo pass -> c (FamilyInfo pass) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (FamilyInfo pass) Source # toConstr :: FamilyInfo pass -> Constr Source # dataTypeOf :: FamilyInfo pass -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (FamilyInfo pass)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (FamilyInfo pass)) Source # gmapT :: (forall b. Data b => b -> b) -> FamilyInfo pass -> FamilyInfo pass Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FamilyInfo pass -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FamilyInfo pass -> r Source # gmapQ :: (forall d. Data d => d -> u) -> FamilyInfo pass -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> FamilyInfo pass -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FamilyInfo pass -> m (FamilyInfo pass) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FamilyInfo pass -> m (FamilyInfo pass) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FamilyInfo pass -> m (FamilyInfo pass) Source #
Outputable (FamilyInfo pass) Source # |
Instance details Defined in HsDecls Methods ppr :: FamilyInfo pass -> SDoc Source # pprPrec :: Rational -> FamilyInfo pass -> SDoc Source #

newtype TyFamInstDecl pass Source #

Type Family Instance Declaration

Constructors

TyFamInstDecl | `AnnKeywordId` : `AnnType`, `AnnInstance`,
Fields tfid_eqn :: TyFamInstEqn pass

Instances

DataId pass => Data (TyFamInstDecl pass) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TyFamInstDecl pass -> c (TyFamInstDecl pass) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (TyFamInstDecl pass) Source # toConstr :: TyFamInstDecl pass -> Constr Source # dataTypeOf :: TyFamInstDecl pass -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (TyFamInstDecl pass)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (TyFamInstDecl pass)) Source # gmapT :: (forall b. Data b => b -> b) -> TyFamInstDecl pass -> TyFamInstDecl pass Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TyFamInstDecl pass -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TyFamInstDecl pass -> r Source # gmapQ :: (forall d. Data d => d -> u) -> TyFamInstDecl pass -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> TyFamInstDecl pass -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TyFamInstDecl pass -> m (TyFamInstDecl pass) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TyFamInstDecl pass -> m (TyFamInstDecl pass) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TyFamInstDecl pass -> m (TyFamInstDecl pass) Source #
(SourceTextX pass, OutputableBndrId pass) => Outputable (TyFamInstDecl pass) Source # |
Instance details Defined in HsDecls Methods ppr :: TyFamInstDecl pass -> SDoc Source # pprPrec :: Rational -> TyFamInstDecl pass -> SDoc Source #

type LTyFamInstDecl pass = Located (TyFamInstDecl pass) Source #

Located Type Family Instance Declaration

instDeclDataFamInsts :: [LInstDecl pass] -> [DataFamInstDecl pass] Source #

newtype DataFamInstDecl pass Source #

Data Family Instance Declaration

Constructors

DataFamInstDecl | `AnnKeywordId` : `AnnData`, `AnnNewType`,`AnnInstance`, `AnnDcolon` `AnnWhere`,`AnnOpen`, `AnnClose`
Fields dfid_eqn :: FamInstEqn pass (HsDataDefn pass)

Instances

DataId pass => Data (DataFamInstDecl pass) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DataFamInstDecl pass -> c (DataFamInstDecl pass) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (DataFamInstDecl pass) Source # toConstr :: DataFamInstDecl pass -> Constr Source # dataTypeOf :: DataFamInstDecl pass -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (DataFamInstDecl pass)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (DataFamInstDecl pass)) Source # gmapT :: (forall b. Data b => b -> b) -> DataFamInstDecl pass -> DataFamInstDecl pass Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DataFamInstDecl pass -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DataFamInstDecl pass -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DataFamInstDecl pass -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DataFamInstDecl pass -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DataFamInstDecl pass -> m (DataFamInstDecl pass) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DataFamInstDecl pass -> m (DataFamInstDecl pass) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DataFamInstDecl pass -> m (DataFamInstDecl pass) Source #
(SourceTextX pass, OutputableBndrId pass) => Outputable (DataFamInstDecl pass) Source # |
Instance details Defined in HsDecls Methods ppr :: DataFamInstDecl pass -> SDoc Source # pprPrec :: Rational -> DataFamInstDecl pass -> SDoc Source #

type LDataFamInstDecl pass = Located (DataFamInstDecl pass) Source #

Located Data Family Instance Declaration

pprDataFamInstFlavour :: DataFamInstDecl pass -> SDoc Source #

pprFamInstLHS :: (SourceTextX pass, OutputableBndrId pass) => Located (IdP pass) -> HsTyPats pass -> LexicalFixity -> HsContext pass -> Maybe (LHsKind pass) -> SDoc Source #

type FamInstEqn pass rhs Source #

Arguments

= HsImplicitBndrs pass (FamEqn pass (HsTyPats pass) rhs) | Here, the `pats` are type patterns (with kind and type bndrs). See Note [Family instance declaration binders]

Family Instance Equation

type LFamInstEqn pass rhs = Located (FamInstEqn pass rhs) Source #

Located Family Instance Equation

data FamEqn pass pats rhs Source #

Family Equation

One equation in a type family instance declaration, data family instance declaration, or type family default. See Note [Type family instance declarations in HsSyn] See Note [Family instance declaration binders]

Constructors

FamEqn | `AnnKeywordId` : `AnnEqual`
Fields feqn_tycon :: Located (IdP pass) feqn_pats :: pats feqn_fixity :: LexicalFixity Fixity used in the declaration feqn_rhs :: rhs

Instances

(DataId pass, Data pats, Data rhs) => Data (FamEqn pass pats rhs) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FamEqn pass pats rhs -> c (FamEqn pass pats rhs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (FamEqn pass pats rhs) Source # toConstr :: FamEqn pass pats rhs -> Constr Source # dataTypeOf :: FamEqn pass pats rhs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (FamEqn pass pats rhs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (FamEqn pass pats rhs)) Source # gmapT :: (forall b. Data b => b -> b) -> FamEqn pass pats rhs -> FamEqn pass pats rhs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FamEqn pass pats rhs -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FamEqn pass pats rhs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> FamEqn pass pats rhs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> FamEqn pass pats rhs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FamEqn pass pats rhs -> m (FamEqn pass pats rhs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FamEqn pass pats rhs -> m (FamEqn pass pats rhs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FamEqn pass pats rhs -> m (FamEqn pass pats rhs) Source #

type TyFamInstEqn pass = FamInstEqn pass (LHsType pass) Source #

Type Family Instance Equation

type LTyFamInstEqn pass Source #

Arguments

= Located (TyFamInstEqn pass) | May have `AnnKeywordId` : `AnnSemi` when in a list

Located Type Family Instance Equation

type TyFamDefltEqn pass = FamEqn pass (LHsQTyVars pass) (LHsType pass) Source #

Type Family Default Equation

type LTyFamDefltEqn pass = Located (TyFamDefltEqn pass) Source #

Located Type Family Default Equation

type HsTyPats pass = [LHsType pass] Source #

Haskell Type Patterns

type LClsInstDecl pass = Located (ClsInstDecl pass) Source #

Located Class Instance Declaration

data ClsInstDecl pass Source #

Class Instance Declaration

Constructors

ClsInstDecl | `AnnKeywordId` : `AnnInstance`, `AnnWhere`, `AnnOpen`,`AnnClose`,
Fields cid_poly_ty :: LHsSigType pass cid_binds :: LHsBinds pass cid_sigs :: [LSig pass] cid_tyfam_insts :: [LTyFamInstDecl pass] cid_datafam_insts :: [LDataFamInstDecl pass] cid_overlap_mode :: Maybe (Located OverlapMode) `AnnKeywordId` : `AnnOpen`, `AnnClose`,

Instances

DataId id => Data (ClsInstDecl id) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ClsInstDecl id -> c (ClsInstDecl id) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ClsInstDecl id) Source # toConstr :: ClsInstDecl id -> Constr Source # dataTypeOf :: ClsInstDecl id -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ClsInstDecl id)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ClsInstDecl id)) Source # gmapT :: (forall b. Data b => b -> b) -> ClsInstDecl id -> ClsInstDecl id Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ClsInstDecl id -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ClsInstDecl id -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ClsInstDecl id -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ClsInstDecl id -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ClsInstDecl id -> m (ClsInstDecl id) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ClsInstDecl id -> m (ClsInstDecl id) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ClsInstDecl id -> m (ClsInstDecl id) Source #
(SourceTextX pass, OutputableBndrId pass) => Outputable (ClsInstDecl pass) Source # |
Instance details Defined in HsDecls Methods ppr :: ClsInstDecl pass -> SDoc Source # pprPrec :: Rational -> ClsInstDecl pass -> SDoc Source #

## Standalone deriving declarations

data DerivDecl pass Source #

Deriving Declaration

Constructors

DerivDecl |
Fields deriv_type :: LHsSigType pass deriv_strategy :: Maybe (Located DerivStrategy) deriv_overlap_mode :: Maybe (Located OverlapMode) `AnnKeywordId` : `AnnDeriving`, `AnnInstance`, `AnnStock`, `AnnAnyClass`, `AnnNewtype`, `AnnOpen`,`AnnClose`

Instances

DataId pass => Data (DerivDecl pass) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DerivDecl pass -> c (DerivDecl pass) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (DerivDecl pass) Source # toConstr :: DerivDecl pass -> Constr Source # dataTypeOf :: DerivDecl pass -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (DerivDecl pass)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (DerivDecl pass)) Source # gmapT :: (forall b. Data b => b -> b) -> DerivDecl pass -> DerivDecl pass Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DerivDecl pass -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DerivDecl pass -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DerivDecl pass -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DerivDecl pass -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DerivDecl pass -> m (DerivDecl pass) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DerivDecl pass -> m (DerivDecl pass) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DerivDecl pass -> m (DerivDecl pass) Source #
(SourceTextX pass, OutputableBndrId pass) => Outputable (DerivDecl pass) Source # |
Instance details Defined in HsDecls Methods ppr :: DerivDecl pass -> SDoc Source # pprPrec :: Rational -> DerivDecl pass -> SDoc Source #

type LDerivDecl pass = Located (DerivDecl pass) Source #

Located Deriving Declaration

## `RULE` declarations

type LRuleDecls pass = Located (RuleDecls pass) Source #

Located Rule Declarations

data RuleDecls pass Source #

Rule Declarations

Constructors

HsRules |
Fields rds_src :: SourceText rds_rules :: [LRuleDecl pass]

Instances

DataId pass => Data (RuleDecls pass) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RuleDecls pass -> c (RuleDecls pass) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (RuleDecls pass) Source # toConstr :: RuleDecls pass -> Constr Source # dataTypeOf :: RuleDecls pass -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (RuleDecls pass)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (RuleDecls pass)) Source # gmapT :: (forall b. Data b => b -> b) -> RuleDecls pass -> RuleDecls pass Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RuleDecls pass -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RuleDecls pass -> r Source # gmapQ :: (forall d. Data d => d -> u) -> RuleDecls pass -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> RuleDecls pass -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RuleDecls pass -> m (RuleDecls pass) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RuleDecls pass -> m (RuleDecls pass) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RuleDecls pass -> m (RuleDecls pass) Source #
(SourceTextX pass, OutputableBndrId pass) => Outputable (RuleDecls pass) Source # |
Instance details Defined in HsDecls Methods ppr :: RuleDecls pass -> SDoc Source # pprPrec :: Rational -> RuleDecls pass -> SDoc Source #

data RuleDecl pass Source #

Rule Declaration

Constructors

HsRule (Located (SourceText, RuleName)) Activation [LRuleBndr pass] (Located (HsExpr pass)) (PostRn pass NameSet) (Located (HsExpr pass)) (PostRn pass NameSet) | `AnnKeywordId` : `AnnOpen`,`AnnTilde`, `AnnVal`, `AnnClose`, `AnnForall`,`AnnDot`, `AnnEqual`,

Instances

DataId pass => Data (RuleDecl pass) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RuleDecl pass -> c (RuleDecl pass) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (RuleDecl pass) Source # toConstr :: RuleDecl pass -> Constr Source # dataTypeOf :: RuleDecl pass -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (RuleDecl pass)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (RuleDecl pass)) Source # gmapT :: (forall b. Data b => b -> b) -> RuleDecl pass -> RuleDecl pass Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RuleDecl pass -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RuleDecl pass -> r Source # gmapQ :: (forall d. Data d => d -> u) -> RuleDecl pass -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> RuleDecl pass -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RuleDecl pass -> m (RuleDecl pass) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RuleDecl pass -> m (RuleDecl pass) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RuleDecl pass -> m (RuleDecl pass) Source #
(SourceTextX pass, OutputableBndrId pass) => Outputable (RuleDecl pass) Source # |
Instance details Defined in HsDecls Methods ppr :: RuleDecl pass -> SDoc Source # pprPrec :: Rational -> RuleDecl pass -> SDoc Source #

type LRuleDecl pass = Located (RuleDecl pass) Source #

Located Rule Declaration

data RuleBndr pass Source #

Rule Binder

Constructors

RuleBndr (Located (IdP pass)) |
RuleBndrSig (Located (IdP pass)) (LHsSigWcType pass) | `AnnKeywordId` : `AnnOpen`, `AnnDcolon`,`AnnClose`

Instances

DataId pass => Data (RuleBndr pass) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RuleBndr pass -> c (RuleBndr pass) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (RuleBndr pass) Source # toConstr :: RuleBndr pass -> Constr Source # dataTypeOf :: RuleBndr pass -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (RuleBndr pass)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (RuleBndr pass)) Source # gmapT :: (forall b. Data b => b -> b) -> RuleBndr pass -> RuleBndr pass Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RuleBndr pass -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RuleBndr pass -> r Source # gmapQ :: (forall d. Data d => d -> u) -> RuleBndr pass -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> RuleBndr pass -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RuleBndr pass -> m (RuleBndr pass) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RuleBndr pass -> m (RuleBndr pass) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RuleBndr pass -> m (RuleBndr pass) Source #
(SourceTextX pass, OutputableBndrId pass) => Outputable (RuleBndr pass) Source # |
Instance details Defined in HsDecls Methods ppr :: RuleBndr pass -> SDoc Source # pprPrec :: Rational -> RuleBndr pass -> SDoc Source #

type LRuleBndr pass = Located (RuleBndr pass) Source #

Located Rule Binder

collectRuleBndrSigTys :: [RuleBndr pass] -> [LHsSigWcType pass] Source #

flattenRuleDecls :: [LRuleDecls pass] -> [LRuleDecl pass] Source #

pprFullRuleName :: Located (SourceText, RuleName) -> SDoc Source #

## `VECTORISE` declarations

data VectDecl pass Source #

Vectorise Declaration

Constructors

HsVect SourceText (Located (IdP pass)) (LHsExpr pass) | `AnnKeywordId` : `AnnOpen`, `AnnEqual`,`AnnClose`
HsNoVect SourceText (Located (IdP pass)) | `AnnKeywordId` : `AnnOpen`, `AnnClose`
HsVectTypeIn SourceText Bool (Located (IdP pass)) (Maybe (Located (IdP pass))) | `AnnKeywordId` : `AnnOpen`, `AnnType`,`AnnClose`, `AnnEqual`
HsVectTypeOut Bool TyCon (Maybe TyCon) |
HsVectClassIn SourceText (Located (IdP pass)) | `AnnKeywordId` : `AnnOpen`, `AnnClass`,`AnnClose`,
HsVectClassOut Class |
HsVectInstIn (LHsSigType pass) |
HsVectInstOut ClsInst |

Instances

DataId pass => Data (VectDecl pass) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> VectDecl pass -> c (VectDecl pass) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (VectDecl pass) Source # toConstr :: VectDecl pass -> Constr Source # dataTypeOf :: VectDecl pass -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (VectDecl pass)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (VectDecl pass)) Source # gmapT :: (forall b. Data b => b -> b) -> VectDecl pass -> VectDecl pass Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> VectDecl pass -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> VectDecl pass -> r Source # gmapQ :: (forall d. Data d => d -> u) -> VectDecl pass -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> VectDecl pass -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> VectDecl pass -> m (VectDecl pass) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> VectDecl pass -> m (VectDecl pass) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> VectDecl pass -> m (VectDecl pass) Source #
(SourceTextX pass, OutputableBndrId pass) => Outputable (VectDecl pass) Source # |
Instance details Defined in HsDecls Methods ppr :: VectDecl pass -> SDoc Source # pprPrec :: Rational -> VectDecl pass -> SDoc Source #

type LVectDecl pass = Located (VectDecl pass) Source #

Located Vectorise Declaration

lvectDeclName :: NamedThing (IdP pass) => LVectDecl pass -> Name Source #

lvectInstDecl :: LVectDecl pass -> Bool Source #

## `default` declarations

data DefaultDecl pass Source #

Default Declaration

Constructors

DefaultDecl [LHsType pass] | `AnnKeywordId`s : `AnnDefault`, `AnnOpen`,`AnnClose`

Instances

DataId pass => Data (DefaultDecl pass) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DefaultDecl pass -> c (DefaultDecl pass) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (DefaultDecl pass) Source # toConstr :: DefaultDecl pass -> Constr Source # dataTypeOf :: DefaultDecl pass -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (DefaultDecl pass)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (DefaultDecl pass)) Source # gmapT :: (forall b. Data b => b -> b) -> DefaultDecl pass -> DefaultDecl pass Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DefaultDecl pass -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DefaultDecl pass -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DefaultDecl pass -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DefaultDecl pass -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DefaultDecl pass -> m (DefaultDecl pass) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DefaultDecl pass -> m (DefaultDecl pass) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DefaultDecl pass -> m (DefaultDecl pass) Source #
(SourceTextX pass, OutputableBndrId pass) => Outputable (DefaultDecl pass) Source # |
Instance details Defined in HsDecls Methods ppr :: DefaultDecl pass -> SDoc Source # pprPrec :: Rational -> DefaultDecl pass -> SDoc Source #

type LDefaultDecl pass = Located (DefaultDecl pass) Source #

Located Default Declaration

## Template haskell declaration splice

data SpliceExplicitFlag Source #

Constructors

ExplicitSplice | = $(f x y)
ImplicitSplice | = f x y, i.e. a naked top level expression

Instances

Data SpliceExplicitFlag Source # |
Instance details Defined in BasicTypes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SpliceExplicitFlag -> c SpliceExplicitFlag Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SpliceExplicitFlag Source # toConstr :: SpliceExplicitFlag -> Constr Source # dataTypeOf :: SpliceExplicitFlag -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SpliceExplicitFlag) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SpliceExplicitFlag) Source # gmapT :: (forall b. Data b => b -> b) -> SpliceExplicitFlag -> SpliceExplicitFlag Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SpliceExplicitFlag -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SpliceExplicitFlag -> r Source # gmapQ :: (forall d. Data d => d -> u) -> SpliceExplicitFlag -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> SpliceExplicitFlag -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SpliceExplicitFlag -> m SpliceExplicitFlag Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SpliceExplicitFlag -> m SpliceExplicitFlag Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SpliceExplicitFlag -> m SpliceExplicitFlag Source #

data SpliceDecl id Source #

Splice Declaration

Constructors

SpliceDecl (Located (HsSplice id)) SpliceExplicitFlag |

Instances

DataId id => Data (SpliceDecl id) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SpliceDecl id -> c (SpliceDecl id) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SpliceDecl id) Source # toConstr :: SpliceDecl id -> Constr Source # dataTypeOf :: SpliceDecl id -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (SpliceDecl id)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (SpliceDecl id)) Source # gmapT :: (forall b. Data b => b -> b) -> SpliceDecl id -> SpliceDecl id Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SpliceDecl id -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SpliceDecl id -> r Source # gmapQ :: (forall d. Data d => d -> u) -> SpliceDecl id -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> SpliceDecl id -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SpliceDecl id -> m (SpliceDecl id) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SpliceDecl id -> m (SpliceDecl id) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SpliceDecl id -> m (SpliceDecl id) Source #
(SourceTextX pass, OutputableBndrId pass) => Outputable (SpliceDecl pass) Source # |
Instance details Defined in HsDecls Methods ppr :: SpliceDecl pass -> SDoc Source # pprPrec :: Rational -> SpliceDecl pass -> SDoc Source #

type LSpliceDecl pass = Located (SpliceDecl pass) Source #

Located Splice Declaration

## Foreign function interface declarations

data ForeignDecl pass Source #

Foreign Declaration

Constructors

ForeignImport |
Fields fd_name :: Located (IdP pass) fd_sig_ty :: LHsSigType pass fd_co :: PostTc pass Coercion fd_fi :: ForeignImport
ForeignExport | `AnnKeywordId` : `AnnForeign`, `AnnImport`,`AnnExport`, `AnnDcolon`
Fields fd_name :: Located (IdP pass) fd_sig_ty :: LHsSigType pass fd_co :: PostTc pass Coercion fd_fe :: ForeignExport

Instances

DataId pass => Data (ForeignDecl pass) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignDecl pass -> c (ForeignDecl pass) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ForeignDecl pass) Source # toConstr :: ForeignDecl pass -> Constr Source # dataTypeOf :: ForeignDecl pass -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ForeignDecl pass)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ForeignDecl pass)) Source # gmapT :: (forall b. Data b => b -> b) -> ForeignDecl pass -> ForeignDecl pass Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignDecl pass -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignDecl pass -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ForeignDecl pass -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignDecl pass -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignDecl pass -> m (ForeignDecl pass) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignDecl pass -> m (ForeignDecl pass) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignDecl pass -> m (ForeignDecl pass) Source #
(SourceTextX pass, OutputableBndrId pass) => Outputable (ForeignDecl pass) Source # |
Instance details Defined in HsDecls Methods ppr :: ForeignDecl pass -> SDoc Source # pprPrec :: Rational -> ForeignDecl pass -> SDoc Source #

type LForeignDecl pass = Located (ForeignDecl pass) Source #

Located Foreign Declaration

data ForeignImport Source #

Constructors

CImport (Located CCallConv) (Located Safety) (Maybe Header) CImportSpec (Located SourceText) |

Instances

Data ForeignImport Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignImport -> c ForeignImport Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ForeignImport Source # toConstr :: ForeignImport -> Constr Source # dataTypeOf :: ForeignImport -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ForeignImport) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ForeignImport) Source # gmapT :: (forall b. Data b => b -> b) -> ForeignImport -> ForeignImport Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignImport -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignImport -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ForeignImport -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignImport -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignImport -> m ForeignImport Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignImport -> m ForeignImport Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignImport -> m ForeignImport Source #
Outputable ForeignImport Source # |
Instance details Defined in HsDecls Methods ppr :: ForeignImport -> SDoc Source # pprPrec :: Rational -> ForeignImport -> SDoc Source #

data ForeignExport Source #

Constructors

CExport (Located CExportSpec) (Located SourceText) |

Instances

Data ForeignExport Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignExport -> c ForeignExport Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ForeignExport Source # toConstr :: ForeignExport -> Constr Source # dataTypeOf :: ForeignExport -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ForeignExport) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ForeignExport) Source # gmapT :: (forall b. Data b => b -> b) -> ForeignExport -> ForeignExport Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignExport -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignExport -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ForeignExport -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignExport -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignExport -> m ForeignExport Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignExport -> m ForeignExport Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignExport -> m ForeignExport Source #
Outputable ForeignExport Source # |
Instance details Defined in HsDecls Methods ppr :: ForeignExport -> SDoc Source # pprPrec :: Rational -> ForeignExport -> SDoc Source #

noForeignImportCoercionYet :: PlaceHolder Source #

noForeignExportCoercionYet :: PlaceHolder Source #

data CImportSpec Source #

Constructors

CLabel CLabelString |
CFunction CCallTarget |
CWrapper |

Instances

Data CImportSpec Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CImportSpec -> c CImportSpec Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CImportSpec Source # toConstr :: CImportSpec -> Constr Source # dataTypeOf :: CImportSpec -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CImportSpec) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CImportSpec) Source # gmapT :: (forall b. Data b => b -> b) -> CImportSpec -> CImportSpec Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CImportSpec -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CImportSpec -> r Source # gmapQ :: (forall d. Data d => d -> u) -> CImportSpec -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> CImportSpec -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec Source #

## Data-constructor declarations

data ConDecl pass Source #

    data T b = forall a. Eq a => MkT a b
      MkT :: forall b a. Eq a => MkT a b

    data T b where
         MkT1 :: Int -> T Int

    data T = Int MkT Int
           | MkT2

    data T a where
         Int MkT Int :: T Int

- `AnnKeywordId`s : `AnnOpen`, `AnnDotdot`,`AnnCLose`, `AnnEqual`,`AnnVbar`, `AnnDarrow`,`AnnDarrow`, `AnnForall`,`AnnDot`

data Constructor Declaration

Constructors

ConDeclGADT |
Fields con_names :: [Located (IdP pass)] con_type :: LHsSigType pass The type after the ‘::’ con_doc :: Maybe LHsDocString A possible Haddock comment.
ConDeclH98 |
Fields con_name :: Located (IdP pass) con_qvars :: Maybe (LHsQTyVars pass) con_cxt :: Maybe (LHsContext pass) User-written context (if any) con_details :: HsConDeclDetails pass Arguments con_doc :: Maybe LHsDocString A possible Haddock comment.

Instances

DataId pass => Data (ConDecl pass) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ConDecl pass -> c (ConDecl pass) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ConDecl pass) Source # toConstr :: ConDecl pass -> Constr Source # dataTypeOf :: ConDecl pass -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ConDecl pass)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ConDecl pass)) Source # gmapT :: (forall b. Data b => b -> b) -> ConDecl pass -> ConDecl pass Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ConDecl pass -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ConDecl pass -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ConDecl pass -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ConDecl pass -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ConDecl pass -> m (ConDecl pass) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ConDecl pass -> m (ConDecl pass) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ConDecl pass -> m (ConDecl pass) Source #
(SourceTextX pass, OutputableBndrId pass) => Outputable (ConDecl pass) Source # |
Instance details Defined in HsDecls Methods ppr :: ConDecl pass -> SDoc Source # pprPrec :: Rational -> ConDecl pass -> SDoc Source #

type LConDecl pass Source #

Arguments

= Located (ConDecl pass) | May have `AnnKeywordId` : `AnnSemi` when in a GADT constructor list

Located data Constructor Declaration

type HsConDeclDetails pass = HsConDetails (LBangType pass) (Located [LConDeclField pass]) Source #

Haskell data Constructor Declaration Details

hsConDeclArgTys :: HsConDeclDetails pass -> [LBangType pass] Source #

getConNames :: ConDecl pass -> [Located (IdP pass)] Source #

getConDetails :: ConDecl pass -> HsConDeclDetails pass Source #

gadtDeclDetails :: LHsSigType pass -> (HsConDeclDetails pass, LHsType pass, LHsContext pass, [LHsTyVarBndr pass]) Source #

## Document comments

data DocDecl Source #

Documentation comment Declaration

Constructors

DocCommentNext HsDocString |
DocCommentPrev HsDocString |
DocCommentNamed String HsDocString |
DocGroup Int HsDocString |

Instances

Data DocDecl Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DocDecl -> c DocDecl Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DocDecl Source # toConstr :: DocDecl -> Constr Source # dataTypeOf :: DocDecl -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DocDecl) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DocDecl) Source # gmapT :: (forall b. Data b => b -> b) -> DocDecl -> DocDecl Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DocDecl -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DocDecl -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DocDecl -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DocDecl -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DocDecl -> m DocDecl Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DocDecl -> m DocDecl Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DocDecl -> m DocDecl Source #
Outputable DocDecl Source # |
Instance details Defined in HsDecls Methods ppr :: DocDecl -> SDoc Source # pprPrec :: Rational -> DocDecl -> SDoc Source #

type LDocDecl = Located DocDecl Source #

Located Documentation comment Declaration

docDeclDoc :: DocDecl -> HsDocString Source #

## Deprecations

data WarnDecl pass Source #

Warning pragma Declaration

Constructors

Warning [Located (IdP pass)] WarningTxt |

Instances

DataId pass => Data (WarnDecl pass) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WarnDecl pass -> c (WarnDecl pass) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (WarnDecl pass) Source # toConstr :: WarnDecl pass -> Constr Source # dataTypeOf :: WarnDecl pass -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (WarnDecl pass)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (WarnDecl pass)) Source # gmapT :: (forall b. Data b => b -> b) -> WarnDecl pass -> WarnDecl pass Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WarnDecl pass -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WarnDecl pass -> r Source # gmapQ :: (forall d. Data d => d -> u) -> WarnDecl pass -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> WarnDecl pass -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> WarnDecl pass -> m (WarnDecl pass) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WarnDecl pass -> m (WarnDecl pass) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WarnDecl pass -> m (WarnDecl pass) Source #
OutputableBndr (IdP pass) => Outputable (WarnDecl pass) Source # |
Instance details Defined in HsDecls Methods ppr :: WarnDecl pass -> SDoc Source # pprPrec :: Rational -> WarnDecl pass -> SDoc Source #

type LWarnDecl pass = Located (WarnDecl pass) Source #

Located Warning pragma Declaration

data WarnDecls pass Source #

Warning pragma Declarations

Constructors

Warnings |
Fields wd_src :: SourceText wd_warnings :: [LWarnDecl pass]

Instances

DataId pass => Data (WarnDecls pass) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WarnDecls pass -> c (WarnDecls pass) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (WarnDecls pass) Source # toConstr :: WarnDecls pass -> Constr Source # dataTypeOf :: WarnDecls pass -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (WarnDecls pass)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (WarnDecls pass)) Source # gmapT :: (forall b. Data b => b -> b) -> WarnDecls pass -> WarnDecls pass Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WarnDecls pass -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WarnDecls pass -> r Source # gmapQ :: (forall d. Data d => d -> u) -> WarnDecls pass -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> WarnDecls pass -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> WarnDecls pass -> m (WarnDecls pass) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WarnDecls pass -> m (WarnDecls pass) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WarnDecls pass -> m (WarnDecls pass) Source #
OutputableBndr (IdP pass) => Outputable (WarnDecls pass) Source # |
Instance details Defined in HsDecls Methods ppr :: WarnDecls pass -> SDoc Source # pprPrec :: Rational -> WarnDecls pass -> SDoc Source #

type LWarnDecls pass = Located (WarnDecls pass) Source #

Located Warning Declarations

## Annotations

data AnnDecl pass Source #

Annotation Declaration

Constructors

HsAnnotation SourceText (AnnProvenance (IdP pass)) (Located (HsExpr pass)) | `AnnKeywordId` : `AnnOpen`, `AnnType` `AnnModule` `AnnClose`

Instances

DataId pass => Data (AnnDecl pass) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnDecl pass -> c (AnnDecl pass) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (AnnDecl pass) Source # toConstr :: AnnDecl pass -> Constr Source # dataTypeOf :: AnnDecl pass -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (AnnDecl pass)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (AnnDecl pass)) Source # gmapT :: (forall b. Data b => b -> b) -> AnnDecl pass -> AnnDecl pass Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnDecl pass -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnDecl pass -> r Source # gmapQ :: (forall d. Data d => d -> u) -> AnnDecl pass -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnDecl pass -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnDecl pass -> m (AnnDecl pass) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnDecl pass -> m (AnnDecl pass) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnDecl pass -> m (AnnDecl pass) Source #
(SourceTextX pass, OutputableBndrId pass) => Outputable (AnnDecl pass) Source # |
Instance details Defined in HsDecls Methods ppr :: AnnDecl pass -> SDoc Source # pprPrec :: Rational -> AnnDecl pass -> SDoc Source #

type LAnnDecl pass = Located (AnnDecl pass) Source #

Located Annotation Declaration

data AnnProvenance name Source #

Annotation Provenance

Constructors

ValueAnnProvenance (Located name) |
TypeAnnProvenance (Located name) |
ModuleAnnProvenance |

Instances

Functor AnnProvenance Source # |
Instance details Defined in HsDecls Methods fmap :: (a -> b) -> AnnProvenance a -> AnnProvenance b Source # (<$) :: a -> AnnProvenance b -> AnnProvenance a Source #
Foldable AnnProvenance Source # |
Instance details Defined in HsDecls Methods fold :: Monoid m => AnnProvenance m -> m Source # foldMap :: Monoid m => (a -> m) -> AnnProvenance a -> m Source # foldr :: (a -> b -> b) -> b -> AnnProvenance a -> b Source # foldr' :: (a -> b -> b) -> b -> AnnProvenance a -> b Source # foldl :: (b -> a -> b) -> b -> AnnProvenance a -> b Source # foldl' :: (b -> a -> b) -> b -> AnnProvenance a -> b Source # foldr1 :: (a -> a -> a) -> AnnProvenance a -> a Source # foldl1 :: (a -> a -> a) -> AnnProvenance a -> a Source # toList :: AnnProvenance a -> [a] Source # null :: AnnProvenance a -> Bool Source # length :: AnnProvenance a -> Int Source # elem :: Eq a => a -> AnnProvenance a -> Bool Source # maximum :: Ord a => AnnProvenance a -> a Source # minimum :: Ord a => AnnProvenance a -> a Source # sum :: Num a => AnnProvenance a -> a Source # product :: Num a => AnnProvenance a -> a Source #
Traversable AnnProvenance Source # |
Instance details Defined in HsDecls Methods traverse :: Applicative f => (a -> f b) -> AnnProvenance a -> f (AnnProvenance b) Source # sequenceA :: Applicative f => AnnProvenance (f a) -> f (AnnProvenance a) Source # mapM :: Monad m => (a -> m b) -> AnnProvenance a -> m (AnnProvenance b) Source # sequence :: Monad m => AnnProvenance (m a) -> m (AnnProvenance a) Source #
Data pass => Data (AnnProvenance pass) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnProvenance pass -> c (AnnProvenance pass) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (AnnProvenance pass) Source # toConstr :: AnnProvenance pass -> Constr Source # dataTypeOf :: AnnProvenance pass -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (AnnProvenance pass)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (AnnProvenance pass)) Source # gmapT :: (forall b. Data b => b -> b) -> AnnProvenance pass -> AnnProvenance pass Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnProvenance pass -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnProvenance pass -> r Source # gmapQ :: (forall d. Data d => d -> u) -> AnnProvenance pass -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnProvenance pass -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnProvenance pass -> m (AnnProvenance pass) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnProvenance pass -> m (AnnProvenance pass) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnProvenance pass -> m (AnnProvenance pass) Source #

annProvenanceName_maybe :: AnnProvenance name -> Maybe name Source #

## Role annotations

data RoleAnnotDecl pass Source #

Role Annotation Declaration

Constructors

RoleAnnotDecl (Located (IdP pass)) [Located (Maybe Role)] | `AnnKeywordId` : `AnnType`, `AnnRole`

Instances

DataId pass => Data (RoleAnnotDecl pass) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RoleAnnotDecl pass -> c (RoleAnnotDecl pass) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (RoleAnnotDecl pass) Source # toConstr :: RoleAnnotDecl pass -> Constr Source # dataTypeOf :: RoleAnnotDecl pass -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (RoleAnnotDecl pass)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (RoleAnnotDecl pass)) Source # gmapT :: (forall b. Data b => b -> b) -> RoleAnnotDecl pass -> RoleAnnotDecl pass Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RoleAnnotDecl pass -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RoleAnnotDecl pass -> r Source # gmapQ :: (forall d. Data d => d -> u) -> RoleAnnotDecl pass -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> RoleAnnotDecl pass -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> RoleAnnotDecl pass -> m (RoleAnnotDecl pass) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RoleAnnotDecl pass -> m (RoleAnnotDecl pass) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RoleAnnotDecl pass -> m (RoleAnnotDecl pass) Source #
OutputableBndr (IdP pass) => Outputable (RoleAnnotDecl pass) Source # |
Instance details Defined in HsDecls Methods ppr :: RoleAnnotDecl pass -> SDoc Source # pprPrec :: Rational -> RoleAnnotDecl pass -> SDoc Source #

type LRoleAnnotDecl pass = Located (RoleAnnotDecl pass) Source #

Located Role Annotation Declaration

roleAnnotDeclName :: RoleAnnotDecl pass -> IdP pass Source #

## Injective type families

data FamilyResultSig pass Source #

type Family Result Signature

Constructors

NoSig | `AnnKeywordId` :
KindSig (LHsKind pass) | `AnnKeywordId` : `AnnOpenP`,`AnnDcolon`, `AnnCloseP`
TyVarSig (LHsTyVarBndr pass) | `AnnKeywordId` : `AnnOpenP`,`AnnDcolon`, `AnnCloseP`, `AnnEqual`

Instances

DataId pass => Data (FamilyResultSig pass) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FamilyResultSig pass -> c (FamilyResultSig pass) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (FamilyResultSig pass) Source # toConstr :: FamilyResultSig pass -> Constr Source # dataTypeOf :: FamilyResultSig pass -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (FamilyResultSig pass)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (FamilyResultSig pass)) Source # gmapT :: (forall b. Data b => b -> b) -> FamilyResultSig pass -> FamilyResultSig pass Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FamilyResultSig pass -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FamilyResultSig pass -> r Source # gmapQ :: (forall d. Data d => d -> u) -> FamilyResultSig pass -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> FamilyResultSig pass -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FamilyResultSig pass -> m (FamilyResultSig pass) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FamilyResultSig pass -> m (FamilyResultSig pass) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FamilyResultSig pass -> m (FamilyResultSig pass) Source #

type LFamilyResultSig pass = Located (FamilyResultSig pass) Source #

Located type Family Result Signature

data InjectivityAnn pass Source #

If the user supplied an injectivity annotation it is represented using InjectivityAnn. At the moment this is a single injectivity condition - see Note [Injectivity annotation]. `Located name` stores the LHS of injectivity condition. `[Located name]` stores the RHS of injectivity condition. Example:

type family Foo a b c = r | r -> a c where ...

This will be represented as "InjectivityAnn `r` [`a`, `c`]"

Constructors

InjectivityAnn (Located (IdP pass)) [Located (IdP pass)] | `AnnKeywordId` : `AnnRarrow`, `AnnVbar`

Instances

DataId pass => Data (InjectivityAnn pass) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> InjectivityAnn pass -> c (InjectivityAnn pass) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (InjectivityAnn pass) Source # toConstr :: InjectivityAnn pass -> Constr Source # dataTypeOf :: InjectivityAnn pass -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (InjectivityAnn pass)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (InjectivityAnn pass)) Source # gmapT :: (forall b. Data b => b -> b) -> InjectivityAnn pass -> InjectivityAnn pass Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InjectivityAnn pass -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InjectivityAnn pass -> r Source # gmapQ :: (forall d. Data d => d -> u) -> InjectivityAnn pass -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> InjectivityAnn pass -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> InjectivityAnn pass -> m (InjectivityAnn pass) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InjectivityAnn pass -> m (InjectivityAnn pass) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InjectivityAnn pass -> m (InjectivityAnn pass) Source #

type LInjectivityAnn pass = Located (InjectivityAnn pass) Source #

Located Injectivity Annotation

resultVariableName :: FamilyResultSig a -> Maybe (IdP a) Source #

Maybe return name of the result type variable

# Grouping

data HsGroup id Source #

Haskell Group

A `HsDecl` is categorised into a `HsGroup` before being fed to the renamer.

Constructors

HsGroup |
Fields hs_valds :: HsValBinds id hs_splcds :: [LSpliceDecl id] hs_tyclds :: [TyClGroup id] hs_derivds :: [LDerivDecl id] hs_fixds :: [LFixitySig id] hs_defds :: [LDefaultDecl id] hs_fords :: [LForeignDecl id] hs_warnds :: [LWarnDecls id] hs_annds :: [LAnnDecl id] hs_ruleds :: [LRuleDecls id] hs_vects :: [LVectDecl id] hs_docs :: [LDocDecl]

Instances

DataId id => Data (HsGroup id) Source # |
Instance details Defined in HsDecls Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsGroup id -> c (HsGroup id) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsGroup id) Source # toConstr :: HsGroup id -> Constr Source # dataTypeOf :: HsGroup id -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsGroup id)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsGroup id)) Source # gmapT :: (forall b. Data b => b -> b) -> HsGroup id -> HsGroup id Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsGroup id -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsGroup id -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsGroup id -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsGroup id -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsGroup id -> m (HsGroup id) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsGroup id -> m (HsGroup id) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsGroup id -> m (HsGroup id) Source #
(SourceTextX pass, OutputableBndrId pass) => Outputable (HsGroup pass) Source # |
Instance details Defined in HsDecls Methods ppr :: HsGroup pass -> SDoc Source # pprPrec :: Rational -> HsGroup pass -> SDoc Source #

emptyRdrGroup :: HsGroup a Source #

emptyRnGroup :: HsGroup a Source #

appendGroups :: HsGroup a -> HsGroup a -> HsGroup a Source #

hsGroupInstDecls :: HsGroup id -> [LInstDecl id] Source #