HsDecls

ghc-8.2.2: 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 name = HsDataDefn {
  - dd_ND :: NewOrData
  - dd_ctxt :: LHsContext name
  - dd_cType :: Maybe (Located CType)
  - dd_kindSig :: Maybe (LHsKind name)
  - dd_cons :: [LConDecl name]
  - dd_derivs :: HsDeriving name
  }
- type HsDeriving name = Located [LHsDerivingClause name]
- data HsDerivingClause name = HsDerivingClause {
  - deriv_clause_strategy :: Maybe (Located DerivStrategy)
  - deriv_clause_tys :: Located [LHsSigType name]
  }
- type LHsDerivingClause name = Located (HsDerivingClause name)
- data TyClDecl name
  - = FamDecl {
    - tcdFam :: FamilyDecl name
    }
  - | SynDecl {
    - tcdLName :: Located name
    - tcdTyVars :: LHsQTyVars name
    - tcdFixity :: LexicalFixity
    - tcdRhs :: LHsType name
    - tcdFVs :: PostRn name NameSet
    }
  - | DataDecl {
    - tcdLName :: Located name
    - tcdTyVars :: LHsQTyVars name
    - tcdFixity :: LexicalFixity
    - tcdDataDefn :: HsDataDefn name
    - tcdDataCusk :: PostRn name Bool
    - tcdFVs :: PostRn name NameSet
    }
  - | ClassDecl {
    - tcdCtxt :: LHsContext name
    - tcdLName :: Located name
    - tcdTyVars :: LHsQTyVars name
    - tcdFixity :: LexicalFixity
    - tcdFDs :: [Located (FunDep (Located name))]
    - tcdSigs :: [LSig name]
    - tcdMeths :: LHsBinds name
    - tcdATs :: [LFamilyDecl name]
    - tcdATDefs :: [LTyFamDefltEqn name]
    - tcdDocs :: [LDocDecl]
    - tcdFVs :: PostRn name NameSet
    }
- type LTyClDecl name = Located (TyClDecl name)
- data TyClGroup name = TyClGroup {
  - group_tyclds :: [LTyClDecl name]
  - group_roles :: [LRoleAnnotDecl name]
  - group_instds :: [LInstDecl name]
  }
- mkTyClGroup :: [LTyClDecl name] -> [LInstDecl name] -> TyClGroup name
- emptyTyClGroup :: TyClGroup name
- tyClGroupTyClDecls :: [TyClGroup name] -> [LTyClDecl name]
- tyClGroupInstDecls :: [TyClGroup name] -> [LInstDecl name]
- tyClGroupRoleDecls :: [TyClGroup name] -> [LRoleAnnotDecl name]
- isClassDecl :: TyClDecl name -> Bool
- isDataDecl :: TyClDecl name -> Bool
- isSynDecl :: TyClDecl name -> Bool
- tcdName :: TyClDecl name -> name
- isFamilyDecl :: TyClDecl name -> Bool
- isTypeFamilyDecl :: TyClDecl name -> Bool
- isDataFamilyDecl :: TyClDecl name -> Bool
- isOpenTypeFamilyInfo :: FamilyInfo name -> Bool
- isClosedTypeFamilyInfo :: FamilyInfo name -> Bool
- tyFamInstDeclName :: TyFamInstDecl name -> name
- tyFamInstDeclLName :: TyFamInstDecl name -> Located name
- countTyClDecls :: [TyClDecl name] -> (Int, Int, Int, Int, Int)
- pprTyClDeclFlavour :: TyClDecl a -> SDoc
- tyClDeclLName :: TyClDecl name -> Located name
- tyClDeclTyVars :: TyClDecl name -> LHsQTyVars name
- hsDeclHasCusk :: TyClDecl Name -> Bool
- famDeclHasCusk :: Maybe Bool -> FamilyDecl name -> Bool
- data FamilyDecl name = FamilyDecl {
  - fdInfo :: FamilyInfo name
  - fdLName :: Located name
  - fdTyVars :: LHsQTyVars name
  - fdFixity :: LexicalFixity
  - fdResultSig :: LFamilyResultSig name
  - fdInjectivityAnn :: Maybe (LInjectivityAnn name)
  }
- type LFamilyDecl name = Located (FamilyDecl name)
- data InstDecl name
  - = ClsInstD {
    - cid_inst :: ClsInstDecl name
    }
  - | DataFamInstD {
    - dfid_inst :: DataFamInstDecl name
    }
  - | TyFamInstD {
    - tfid_inst :: TyFamInstDecl name
    }
- type LInstDecl name = Located (InstDecl name)
- data NewOrData
  - = NewType
  - | DataType
- data FamilyInfo name
  - = DataFamily
  - | OpenTypeFamily
  - | ClosedTypeFamily (Maybe [LTyFamInstEqn name])
- data TyFamInstDecl name = TyFamInstDecl {
  - tfid_eqn :: LTyFamInstEqn name
  - tfid_fvs :: PostRn name NameSet
  }
- type LTyFamInstDecl name = Located (TyFamInstDecl name)
- instDeclDataFamInsts :: [LInstDecl name] -> [DataFamInstDecl name]
- data DataFamInstDecl name = DataFamInstDecl {
  - dfid_tycon :: Located name
  - dfid_pats :: HsTyPats name
  - dfid_fixity :: LexicalFixity
  - dfid_defn :: HsDataDefn name
  - dfid_fvs :: PostRn name NameSet
  }
- type LDataFamInstDecl name = Located (DataFamInstDecl name)
- pprDataFamInstFlavour :: DataFamInstDecl name -> SDoc
- data TyFamEqn name pats = TyFamEqn {
  - tfe_tycon :: Located name
  - tfe_pats :: pats
  - tfe_fixity :: LexicalFixity
  - tfe_rhs :: LHsType name
  }
- type TyFamInstEqn name = TyFamEqn name (HsTyPats name)
- type LTyFamInstEqn name = Located (TyFamInstEqn name)
- type TyFamDefltEqn name = TyFamEqn name (LHsQTyVars name)
- type LTyFamDefltEqn name = Located (TyFamDefltEqn name)
- type HsTyPats name = HsImplicitBndrs name [LHsType name]
- type LClsInstDecl name = Located (ClsInstDecl name)
- data ClsInstDecl name = ClsInstDecl {
  - cid_poly_ty :: LHsSigType name
  - cid_binds :: LHsBinds name
  - cid_sigs :: [LSig name]
  - cid_tyfam_insts :: [LTyFamInstDecl name]
  - cid_datafam_insts :: [LDataFamInstDecl name]
  - cid_overlap_mode :: Maybe (Located OverlapMode)
  }
- data DerivDecl name = DerivDecl {
  - deriv_type :: LHsSigType name
  - deriv_strategy :: Maybe (Located DerivStrategy)
  - deriv_overlap_mode :: Maybe (Located OverlapMode)
  }
- type LDerivDecl name = Located (DerivDecl name)
- type LRuleDecls name = Located (RuleDecls name)
- data RuleDecls name = HsRules {
  - rds_src :: SourceText
  - rds_rules :: [LRuleDecl name]
  }
- data RuleDecl name = HsRule (Located (SourceText, RuleName)) Activation [LRuleBndr name] (Located (HsExpr name)) (PostRn name NameSet) (Located (HsExpr name)) (PostRn name NameSet)
- type LRuleDecl name = Located (RuleDecl name)
- data RuleBndr name
  - = RuleBndr (Located name)
  - | RuleBndrSig (Located name) (LHsSigWcType name)
- type LRuleBndr name = Located (RuleBndr name)
- collectRuleBndrSigTys :: [RuleBndr name] -> [LHsSigWcType name]
- flattenRuleDecls :: [LRuleDecls name] -> [LRuleDecl name]
- pprFullRuleName :: Located (SourceText, RuleName) -> SDoc
- data VectDecl name
  - = HsVect SourceText (Located name) (LHsExpr name)
  - | HsNoVect SourceText (Located name)
  - | HsVectTypeIn SourceText Bool (Located name) (Maybe (Located name))
  - | HsVectTypeOut Bool TyCon (Maybe TyCon)
  - | HsVectClassIn SourceText (Located name)
  - | HsVectClassOut Class
  - | HsVectInstIn (LHsSigType name)
  - | HsVectInstOut ClsInst
- type LVectDecl name = Located (VectDecl name)
- lvectDeclName :: NamedThing name => LVectDecl name -> Name
- lvectInstDecl :: LVectDecl name -> Bool
- data DefaultDecl name = DefaultDecl [LHsType name]
- type LDefaultDecl name = Located (DefaultDecl name)
- data SpliceExplicitFlag
  - = ExplicitSplice
  - | ImplicitSplice
- data SpliceDecl id = SpliceDecl (Located (HsSplice id)) SpliceExplicitFlag
- type LSpliceDecl name = Located (SpliceDecl name)
- data ForeignDecl name
  - = ForeignImport {
    - fd_name :: Located name
    - fd_sig_ty :: LHsSigType name
    - fd_co :: PostTc name Coercion
    - fd_fi :: ForeignImport
    }
  - | ForeignExport {
    - fd_name :: Located name
    - fd_sig_ty :: LHsSigType name
    - fd_co :: PostTc name Coercion
    - fd_fe :: ForeignExport
    }
- type LForeignDecl name = Located (ForeignDecl name)
- 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 name
  - = ConDeclGADT {
    - con_names :: [Located name]
    - con_type :: LHsSigType name
    - con_doc :: Maybe LHsDocString
    }
  - | ConDeclH98 {
    - con_name :: Located name
    - con_qvars :: Maybe (LHsQTyVars name)
    - con_cxt :: Maybe (LHsContext name)
    - con_details :: HsConDeclDetails name
    - con_doc :: Maybe LHsDocString
    }
- type LConDecl name = Located (ConDecl name)
- type HsConDeclDetails name = HsConDetails (LBangType name) (Located [LConDeclField name])
- hsConDeclArgTys :: HsConDeclDetails name -> [LBangType name]
- getConNames :: ConDecl name -> [Located name]
- getConDetails :: ConDecl name -> HsConDeclDetails name
- gadtDeclDetails :: LHsSigType name -> (HsConDeclDetails name, LHsType name, LHsContext name, [LHsTyVarBndr name])
- data DocDecl
  - = DocCommentNext HsDocString
  - | DocCommentPrev HsDocString
  - | DocCommentNamed String HsDocString
  - | DocGroup Int HsDocString
- type LDocDecl = Located DocDecl
- docDeclDoc :: DocDecl -> HsDocString
- data WarnDecl name = Warning [Located name] WarningTxt
- type LWarnDecl name = Located (WarnDecl name)
- data WarnDecls name = Warnings {
  - wd_src :: SourceText
  - wd_warnings :: [LWarnDecl name]
  }
- type LWarnDecls name = Located (WarnDecls name)
- data AnnDecl name = HsAnnotation SourceText (AnnProvenance name) (Located (HsExpr name))
- type LAnnDecl name = Located (AnnDecl name)
- data AnnProvenance name
  - = ValueAnnProvenance (Located name)
  - | TypeAnnProvenance (Located name)
  - | ModuleAnnProvenance
- annProvenanceName_maybe :: AnnProvenance name -> Maybe name
- data RoleAnnotDecl name = RoleAnnotDecl (Located name) [Located (Maybe Role)]
- type LRoleAnnotDecl name = Located (RoleAnnotDecl name)
- roleAnnotDeclName :: RoleAnnotDecl name -> name
- data FamilyResultSig name
  - = NoSig
  - | KindSig (LHsKind name)
  - | TyVarSig (LHsTyVarBndr name)
- type LFamilyResultSig name = Located (FamilyResultSig name)
- data InjectivityAnn name = InjectivityAnn (Located name) [Located name]
- type LInjectivityAnn name = Located (InjectivityAnn name)
- resultVariableName :: FamilyResultSig a -> Maybe 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) # |
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 #
OutputableBndrId name => Outputable (HsDecl name) # |
Methods ppr :: HsDecl name -> SDoc Source # pprPrec :: Rational -> HsDecl name -> SDoc Source #

type LHsDecl id Source #

Arguments

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

data HsDataDefn name 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 name Context dd_cType :: Maybe (Located CType) dd_kindSig :: Maybe (LHsKind name) 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 name] 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 name Optional 'deriving' claues

Instances

DataId id => Data (HsDataDefn id) # |
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 #
OutputableBndrId name => Outputable (HsDataDefn name) # |
Methods ppr :: HsDataDefn name -> SDoc Source # pprPrec :: Rational -> HsDataDefn name -> SDoc Source #

type HsDeriving name Source #

Arguments

= Located [LHsDerivingClause name] | 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 name 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 name] 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) # |
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 #
OutputableBndrId name => Outputable (HsDerivingClause name) # |
Methods ppr :: HsDerivingClause name -> SDoc Source # pprPrec :: Rational -> HsDerivingClause name -> SDoc Source #

type LHsDerivingClause name = Located (HsDerivingClause name) Source #

## Class or type declarations

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

Instances

DataId id => Data (TyClDecl id) # |
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 #
OutputableBndrId name => Outputable (TyClDecl name) # |
Methods ppr :: TyClDecl name -> SDoc Source # pprPrec :: Rational -> TyClDecl name -> SDoc Source #

type LTyClDecl name = Located (TyClDecl name) Source #

Located Declaration of a Type or Class

data TyClGroup name Source #

Type or Class Group

Constructors

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

Instances

DataId id => Data (TyClGroup id) # |
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 #
OutputableBndrId name => Outputable (TyClGroup name) # |
Methods ppr :: TyClGroup name -> SDoc Source # pprPrec :: Rational -> TyClGroup name -> SDoc Source #

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

emptyTyClGroup :: TyClGroup name Source #

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

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

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

isClassDecl :: TyClDecl name -> Bool Source #

type class

isDataDecl :: TyClDecl name -> Bool Source #

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

isSynDecl :: TyClDecl name -> Bool Source #

type or type instance declaration

tcdName :: TyClDecl name -> name Source #

isFamilyDecl :: TyClDecl name -> Bool Source #

type/data family declaration

isTypeFamilyDecl :: TyClDecl name -> Bool Source #

type family declaration

isDataFamilyDecl :: TyClDecl name -> Bool Source #

data family declaration

isOpenTypeFamilyInfo :: FamilyInfo name -> Bool Source #

open type family info

isClosedTypeFamilyInfo :: FamilyInfo name -> Bool Source #

closed type family info

tyFamInstDeclName :: TyFamInstDecl name -> name Source #

tyFamInstDeclLName :: TyFamInstDecl name -> Located name Source #

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

pprTyClDeclFlavour :: TyClDecl a -> SDoc Source #

tyClDeclLName :: TyClDecl name -> Located name Source #

tyClDeclTyVars :: TyClDecl name -> LHsQTyVars name Source #

hsDeclHasCusk :: TyClDecl Name -> 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 name |
-> Bool |

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

data FamilyDecl name Source #

type Family Declaration

Constructors

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

Instances

DataId id => Data (FamilyDecl id) # |
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 #
OutputableBndrId name => Outputable (FamilyDecl name) # |
Methods ppr :: FamilyDecl name -> SDoc Source # pprPrec :: Rational -> FamilyDecl name -> SDoc Source #

type LFamilyDecl name = Located (FamilyDecl name) Source #

Located type Family Declaration

## Instance declarations

data InstDecl name Source #

Instance Declaration

Constructors

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

Instances

DataId id => Data (InstDecl id) # |
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 #
OutputableBndrId name => Outputable (InstDecl name) # |
Methods ppr :: InstDecl name -> SDoc Source # pprPrec :: Rational -> InstDecl name -> SDoc Source #

type LInstDecl name = Located (InstDecl name) Source #

Located Instance Declaration

data NewOrData Source #

Constructors

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

Instances

Eq NewOrData # |
Methods (==) :: NewOrData -> NewOrData -> Bool # (/=) :: NewOrData -> NewOrData -> Bool #
Data NewOrData # |
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 # |
Methods ppr :: NewOrData -> SDoc Source # pprPrec :: Rational -> NewOrData -> SDoc Source #

data FamilyInfo name Source #

Constructors

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

Instances

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

data TyFamInstDecl name Source #

Type Family Instance Declaration

Constructors

TyFamInstDecl | `AnnKeywordId` : `AnnType`, `AnnInstance`,
Fields tfid_eqn :: LTyFamInstEqn name tfid_fvs :: PostRn name NameSet

Instances

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

type LTyFamInstDecl name = Located (TyFamInstDecl name) Source #

Located Type Family Instance Declaration

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

data DataFamInstDecl name Source #

Data Family Instance Declaration

Constructors

DataFamInstDecl | `AnnKeywordId` : `AnnData`, `AnnNewType`,`AnnInstance`, `AnnDcolon` `AnnWhere`,`AnnOpen`, `AnnClose`
Fields dfid_tycon :: Located name dfid_pats :: HsTyPats name dfid_fixity :: LexicalFixity Fixity used in the declaration dfid_defn :: HsDataDefn name dfid_fvs :: PostRn name NameSet

Instances

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

type LDataFamInstDecl name = Located (DataFamInstDecl name) Source #

Located Data Family Instance Declaration

pprDataFamInstFlavour :: DataFamInstDecl name -> SDoc Source #

data TyFamEqn name pats Source #

Type Family Equation

One equation in a type family instance declaration See Note [Type family instance declarations in HsSyn]

Constructors

TyFamEqn | `AnnKeywordId` : `AnnEqual`
Fields tfe_tycon :: Located name tfe_pats :: pats tfe_fixity :: LexicalFixity Fixity used in the declaration tfe_rhs :: LHsType name

Instances

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

type TyFamInstEqn name = TyFamEqn name (HsTyPats name) Source #

Type Family Instance Equation

type LTyFamInstEqn name Source #

Arguments

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

Located Type Family Instance Equation

type TyFamDefltEqn name = TyFamEqn name (LHsQTyVars name) Source #

Type Family Default Equation

type LTyFamDefltEqn name = Located (TyFamDefltEqn name) Source #

Located Type Family Default Equation

type HsTyPats name Source #

Arguments

= HsImplicitBndrs name [LHsType name] | Type patterns (with kind and type bndrs) See Note [Family instance declaration binders]

Haskell Type Patterns

type LClsInstDecl name = Located (ClsInstDecl name) Source #

Located Class Instance Declaration

data ClsInstDecl name Source #

Class Instance Declaration

Constructors

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

Instances

DataId id => Data (ClsInstDecl id) # |
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 #
OutputableBndrId name => Outputable (ClsInstDecl name) # |
Methods ppr :: ClsInstDecl name -> SDoc Source # pprPrec :: Rational -> ClsInstDecl name -> SDoc Source #

## Standalone deriving declarations

data DerivDecl name Source #

Deriving Declaration

Constructors

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

Instances

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

type LDerivDecl name = Located (DerivDecl name) Source #

Located Deriving Declaration

## `RULE` declarations

type LRuleDecls name = Located (RuleDecls name) Source #

Located Rule Declarations

data RuleDecls name Source #

Rule Declarations

Constructors

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

Instances

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

data RuleDecl name Source #

Rule Declaration

Constructors

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

Instances

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

type LRuleDecl name = Located (RuleDecl name) Source #

Located Rule Declaration

data RuleBndr name Source #

Rule Binder

Constructors

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

Instances

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

type LRuleBndr name = Located (RuleBndr name) Source #

Located Rule Binder

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

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

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

## `VECTORISE` declarations

data VectDecl name Source #

Vectorise Declaration

Constructors

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

Instances

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

type LVectDecl name = Located (VectDecl name) Source #

Located Vectorise Declaration

lvectDeclName :: NamedThing name => LVectDecl name -> Name Source #

lvectInstDecl :: LVectDecl name -> Bool Source #

## `default` declarations

data DefaultDecl name Source #

Default Declaration

Constructors

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

Instances

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

type LDefaultDecl name = Located (DefaultDecl name) 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 # |
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) # |
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 #
OutputableBndrId name => Outputable (SpliceDecl name) # |
Methods ppr :: SpliceDecl name -> SDoc Source # pprPrec :: Rational -> SpliceDecl name -> SDoc Source #

type LSpliceDecl name = Located (SpliceDecl name) Source #

Located Splice Declaration

## Foreign function interface declarations

data ForeignDecl name Source #

Foreign Declaration

Constructors

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

Instances

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

type LForeignDecl name = Located (ForeignDecl name) Source #

Located Foreign Declaration

data ForeignImport Source #

Constructors

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

Instances

Data ForeignImport # |
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 # |
Methods ppr :: ForeignImport -> SDoc Source # pprPrec :: Rational -> ForeignImport -> SDoc Source #

data ForeignExport Source #

Constructors

CExport (Located CExportSpec) (Located SourceText) |

Instances

Data ForeignExport # |
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 # |
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 # |
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 name 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 name] con_type :: LHsSigType name The type after the ‘::’ con_doc :: Maybe LHsDocString A possible Haddock comment.
ConDeclH98 |
Fields con_name :: Located name con_qvars :: Maybe (LHsQTyVars name) con_cxt :: Maybe (LHsContext name) User-written context (if any) con_details :: HsConDeclDetails name Arguments con_doc :: Maybe LHsDocString A possible Haddock comment.

Instances

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

type LConDecl name Source #

Arguments

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

Located data Constructor Declaration

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

Haskell data Constructor Declaration Details

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

getConNames :: ConDecl name -> [Located name] Source #

getConDetails :: ConDecl name -> HsConDeclDetails name Source #

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

## Document comments

data DocDecl Source #

Documentation comment Declaration

Constructors

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

Instances

Data DocDecl # |
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 # |
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 name Source #

Warning pragma Declaration

Constructors

Warning [Located name] WarningTxt |

Instances

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

type LWarnDecl name = Located (WarnDecl name) Source #

Located Warning pragma Declaration

data WarnDecls name Source #

Warning pragma Declarations

Constructors

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

Instances

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

type LWarnDecls name = Located (WarnDecls name) Source #

Located Warning Declarations

## Annotations

data AnnDecl name Source #

Annotation Declaration

Constructors

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

Instances

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

type LAnnDecl name = Located (AnnDecl name) Source #

Located Annotation Declaration

data AnnProvenance name Source #

Annotation Provenance

Constructors

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

Instances

Functor AnnProvenance # |
Methods fmap :: (a -> b) -> AnnProvenance a -> AnnProvenance b Source # (<$) :: a -> AnnProvenance b -> AnnProvenance a Source #
Foldable AnnProvenance # |
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 # |
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 name => Data (AnnProvenance name) # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnProvenance name -> c (AnnProvenance name) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (AnnProvenance name) Source # toConstr :: AnnProvenance name -> Constr Source # dataTypeOf :: AnnProvenance name -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (AnnProvenance name)) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (AnnProvenance name)) Source # gmapT :: (forall b. Data b => b -> b) -> AnnProvenance name -> AnnProvenance name Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnProvenance name -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnProvenance name -> r Source # gmapQ :: (forall d. Data d => d -> u) -> AnnProvenance name -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnProvenance name -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnProvenance name -> m (AnnProvenance name) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnProvenance name -> m (AnnProvenance name) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnProvenance name -> m (AnnProvenance name) Source #

annProvenanceName_maybe :: AnnProvenance name -> Maybe name Source #

## Role annotations

data RoleAnnotDecl name Source #

Role Annotation Declaration

Constructors

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

Instances

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

type LRoleAnnotDecl name = Located (RoleAnnotDecl name) Source #

Located Role Annotation Declaration

roleAnnotDeclName :: RoleAnnotDecl name -> name Source #

## Injective type families

data FamilyResultSig name Source #

type Family Result Signature

Constructors

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

Instances

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

type LFamilyResultSig name = Located (FamilyResultSig name) Source #

Located type Family Result Signature

data InjectivityAnn name 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 name) [Located name] | `AnnKeywordId` : `AnnRarrow`, `AnnVbar`

Instances

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

type LInjectivityAnn name = Located (InjectivityAnn name) Source #

Located Injectivity Annotation

resultVariableName :: FamilyResultSig a -> Maybe 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) # |
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 #
OutputableBndrId name => Outputable (HsGroup name) # |
Methods ppr :: HsGroup name -> SDoc Source # pprPrec :: Rational -> HsGroup name -> SDoc Source #

emptyRdrGroup :: HsGroup a Source #

emptyRnGroup :: HsGroup a Source #

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

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