| Copyright | (C) 2014 Richard Eisenberg |
|---|---|
| License | BSD-style (see LICENSE) |
| Maintainer | Ryan Scott |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Language.Haskell.TH.Desugar
Description
Desugars full Template Haskell syntax into a smaller core syntax for further processing.
Synopsis
- data DExp
- data DLetDec
- data NamespaceSpecifier
- data DPat
- data DType
- data DForallTelescope
- type DKind = DType
- type DCxt = [DPred]
- type DPred = DType
- data DTyVarBndr flag
- type DTyVarBndrSpec = DTyVarBndr Specificity
- type DTyVarBndrUnit = DTyVarBndr ()
- data Specificity
- type DTyVarBndrVis = DTyVarBndr BndrVis
- data BndrVis
- data DMatch = DMatch DPat DExp
- data DClause = DClause [DPat] DExp
- data DDec
- = DLetDec DLetDec
- | DDataD DataFlavor DCxt Name [DTyVarBndrVis] (Maybe DKind) [DCon] [DDerivClause]
- | DTySynD Name [DTyVarBndrVis] DType
- | DClassD DCxt Name [DTyVarBndrVis] [FunDep] [DDec]
- | DInstanceD (Maybe Overlap) (Maybe [DTyVarBndrUnit]) DCxt DType [DDec]
- | DForeignD DForeign
- | DOpenTypeFamilyD DTypeFamilyHead
- | DClosedTypeFamilyD DTypeFamilyHead [DTySynEqn]
- | DDataFamilyD Name [DTyVarBndrVis] (Maybe DKind)
- | DDataInstD DataFlavor DCxt (Maybe [DTyVarBndrUnit]) DType (Maybe DKind) [DCon] [DDerivClause]
- | DTySynInstD DTySynEqn
- | DRoleAnnotD Name [Role]
- | DStandaloneDerivD (Maybe DDerivStrategy) (Maybe [DTyVarBndrUnit]) DCxt DType
- | DDefaultSigD Name DType
- | DPatSynD Name PatSynArgs DPatSynDir DPat
- | DPatSynSigD Name DPatSynType
- | DKiSigD Name DKind
- | DDefaultD [DType]
- data DDerivClause = DDerivClause (Maybe DDerivStrategy) DCxt
- data DDerivStrategy
- data DPatSynDir
- = DUnidir
- | DImplBidir
- | DExplBidir [DClause]
- type DPatSynType = DType
- data Overlap
- data PatSynArgs
- = PrefixPatSyn [Name]
- | InfixPatSyn Name Name
- | RecordPatSyn [Name]
- data DataFlavor
- data DTypeFamilyHead = DTypeFamilyHead Name [DTyVarBndrVis] DFamilyResultSig (Maybe InjectivityAnn)
- data DFamilyResultSig
- data InjectivityAnn = InjectivityAnn Name [Name]
- data DCon = DCon [DTyVarBndrSpec] DCxt Name DConFields DType
- data DConFields
- type DDeclaredInfix = Bool
- type DBangType = (Bang, DType)
- type DVarBangType = (Name, Bang, DType)
- data Bang = Bang SourceUnpackedness SourceStrictness
- data SourceUnpackedness
- data SourceStrictness
- data DForeign
- data DPragma
- data DRuleBndr
- data DTySynEqn = DTySynEqn (Maybe [DTyVarBndrUnit]) DType DType
- data DInfo
- type DInstanceDec = DDec
- data Role
- data AnnTarget
- class Desugar th ds | ds -> th where
- dsExp :: DsMonad q => Exp -> q DExp
- dsDecs :: DsMonad q => [Dec] -> q [DDec]
- dsType :: DsMonad q => Type -> q DType
- dsInfo :: DsMonad q => Info -> q DInfo
- dsPatOverExp :: DsMonad q => Pat -> DExp -> q (DPat, DExp)
- dsPatsOverExp :: DsMonad q => [Pat] -> DExp -> q ([DPat], DExp)
- dsPatX :: DsMonad q => Pat -> q (DPat, [(Name, DExp)])
- dsLetDecs :: DsMonad q => [Dec] -> q ([DLetDec], DExp -> DExp)
- dsTvb :: DsMonad q => TyVarBndr_ flag -> q (DTyVarBndr flag)
- dsTvbSpec :: DsMonad q => TyVarBndrSpec -> q DTyVarBndrSpec
- dsTvbUnit :: DsMonad q => TyVarBndrUnit -> q DTyVarBndrUnit
- dsTvbVis :: DsMonad q => TyVarBndrVis -> q DTyVarBndrVis
- dsCxt :: DsMonad q => Cxt -> q DCxt
- dsCon :: DsMonad q => [DTyVarBndrVis] -> DType -> Con -> q [DCon]
- dsForeign :: DsMonad q => Foreign -> q DForeign
- dsPragma :: DsMonad q => Pragma -> q DPragma
- dsRuleBndr :: DsMonad q => RuleBndr -> q DRuleBndr
- type PatM (q :: Type -> Type) = WriterT [(Name, DExp)] q
- dsPred :: DsMonad q => Pred -> q DCxt
- dsPat :: forall (q :: Type -> Type). DsMonad q => Pat -> PatM q DPat
- dsDec :: DsMonad q => Dec -> q [DDec]
- dsDataDec :: DsMonad q => DataFlavor -> Cxt -> Name -> [TyVarBndrVis] -> Maybe Kind -> [Con] -> [DerivingClause] -> q [DDec]
- dsDataInstDec :: DsMonad q => DataFlavor -> Cxt -> Name -> Maybe [TyVarBndrUnit] -> [TypeArg] -> Maybe Kind -> [Con] -> [DerivingClause] -> q [DDec]
- type DerivingClause = DerivClause
- dsDerivClause :: DsMonad q => DerivingClause -> q DDerivClause
- dsLetDec :: DsMonad q => Dec -> q ([DLetDec], DExp -> DExp)
- dsMatches :: DsMonad q => Name -> [Match] -> q [DMatch]
- dsBody :: DsMonad q => Body -> [Dec] -> DExp -> q DExp
- dsGuards :: DsMonad q => [(Guard, Exp)] -> DExp -> q DExp
- dsDoStmts :: DsMonad q => Maybe ModName -> [Stmt] -> q DExp
- dsComp :: DsMonad q => [Stmt] -> q DExp
- dsClauses :: DsMonad q => MatchContext -> [Clause] -> q [DClause]
- dsBangType :: DsMonad q => BangType -> q DBangType
- dsVarBangType :: DsMonad q => VarBangType -> q DVarBangType
- dsTypeFamilyHead :: DsMonad q => TypeFamilyHead -> q DTypeFamilyHead
- dsFamilyResultSig :: DsMonad q => FamilyResultSig -> q DFamilyResultSig
- dsPatSynDir :: DsMonad q => Name -> PatSynDir -> q DPatSynDir
- dsTypeArg :: DsMonad q => TypeArg -> q DTypeArg
- module Language.Haskell.TH.Desugar.Sweeten
- expand :: (DsMonad q, Data a) => a -> q a
- expandType :: DsMonad q => DType -> q DType
- reifyWithWarning :: (Quasi q, MonadFail q) => Name -> q Info
- withLocalDeclarations :: DsMonad q => [Dec] -> DsM q a -> q a
- dsReify :: DsMonad q => Name -> q (Maybe DInfo)
- dsReifyType :: DsMonad q => Name -> q (Maybe DType)
- reifyWithLocals_maybe :: DsMonad q => Name -> q (Maybe Info)
- reifyWithLocals :: DsMonad q => Name -> q Info
- reifyFixityWithLocals :: DsMonad q => Name -> q (Maybe Fixity)
- reifyTypeWithLocals_maybe :: DsMonad q => Name -> q (Maybe Type)
- reifyTypeWithLocals :: DsMonad q => Name -> q Type
- lookupValueNameWithLocals :: DsMonad q => String -> q (Maybe Name)
- lookupTypeNameWithLocals :: DsMonad q => String -> q (Maybe Name)
- mkDataNameWithLocals :: DsMonad q => String -> q Name
- mkTypeNameWithLocals :: DsMonad q => String -> q Name
- reifyNameSpace :: DsMonad q => Name -> q (Maybe NameSpace)
- class (Quasi m, MonadFail m) => DsMonad (m :: Type -> Type) where
- localDeclarations :: m [Dec]
- data DsM (q :: Type -> Type) a
- scExp :: DsMonad q => DExp -> q DExp
- scLetDec :: DsMonad q => DLetDec -> q DLetDec
- module Language.Haskell.TH.Desugar.Subst
- fvDType :: DType -> OSet Name
- extractBoundNamesDPat :: DPat -> OSet Name
- applyDExp :: DExp -> [DExp] -> DExp
- dPatToDExp :: DPat -> DExp
- removeWilds :: DsMonad q => DPat -> q DPat
- getDataD :: DsMonad q => String -> Name -> q (DataFlavor, [TyVarBndrVis], [Con])
- dataConNameToDataName :: DsMonad q => Name -> q Name
- dataConNameToCon :: DsMonad q => Name -> q Con
- nameOccursIn :: Data a => Name -> a -> Bool
- allNamesIn :: Data a => a -> [Name]
- flattenDValD :: Quasi q => DLetDec -> q [DLetDec]
- getRecordSelectors :: DsMonad q => [DCon] -> q [DLetDec]
- mkTypeName :: Quasi q => String -> q Name
- mkDataName :: Quasi q => String -> q Name
- newUniqueName :: Quasi q => String -> q Name
- mkTupleDExp :: [DExp] -> DExp
- mkTupleDPat :: [DPat] -> DPat
- maybeDLetE :: [DLetDec] -> DExp -> DExp
- maybeDCaseE :: MatchContext -> DExp -> [DMatch] -> DExp
- mkDLamEFromDPats :: Quasi q => [DPat] -> DExp -> q DExp
- tupleNameDegree_maybe :: Name -> Maybe Int
- unboxedSumNameDegree_maybe :: Name -> Maybe Int
- unboxedTupleNameDegree_maybe :: Name -> Maybe Int
- isTypeKindName :: Name -> Bool
- typeKindName :: Name
- bindIP :: forall (name :: Symbol) a r. a -> (IP name a => r) -> r
- mkExtraDKindBinders :: DsMonad q => DKind -> q [DTyVarBndrVis]
- dTyVarBndrToDType :: DTyVarBndr flag -> DType
- changeDTVFlags :: newFlag -> [DTyVarBndr oldFlag] -> [DTyVarBndr newFlag]
- toposortTyVarsOf :: [DType] -> [DTyVarBndrUnit]
- toposortKindVarsOfTvbs :: [DTyVarBndr flag] -> [DTyVarBndrUnit]
- data FunArgs
- data ForallTelescope
- data VisFunArg
- filterVisFunArgs :: FunArgs -> [VisFunArg]
- ravelType :: FunArgs -> Type -> Type
- unravelType :: Type -> (FunArgs, Type)
- data DFunArgs
- data DVisFunArg
- filterDVisFunArgs :: DFunArgs -> [DVisFunArg]
- ravelDType :: DFunArgs -> DType -> DType
- unravelDType :: DType -> (DFunArgs, DType)
- data TypeArg
- applyType :: Type -> [TypeArg] -> Type
- filterTANormals :: [TypeArg] -> [Type]
- tyVarBndrVisToTypeArg :: TyVarBndrVis -> TypeArg
- tyVarBndrVisToTypeArgWithSig :: TyVarBndrVis -> TypeArg
- unfoldType :: Type -> (Type, [TypeArg])
- data DTypeArg
- applyDType :: DType -> [DTypeArg] -> DType
- filterDTANormals :: [DTypeArg] -> [DType]
- dTyVarBndrVisToDTypeArg :: DTyVarBndrVis -> DTypeArg
- dTyVarBndrVisToDTypeArgWithSig :: DTyVarBndrVis -> DTypeArg
- unfoldDType :: DType -> (DType, [DTypeArg])
- extractBoundNamesStmt :: Stmt -> OSet Name
- extractBoundNamesDec :: Dec -> OSet Name
- extractBoundNamesPat :: Pat -> OSet Name
Desugared data types
Corresponds to TH's Exp type. Note that DLamE takes names, not patterns.
Constructors
Instances
Declarations as used in a let statement.
Constructors
| DFunD Name [DClause] | |
| DValD DPat DExp | |
| DSigD Name DType | |
| DInfixD Fixity NamespaceSpecifier Name | |
| DPragmaD DPragma |
Instances
| Data DLetDec Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DLetDec -> c DLetDec Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DLetDec Source # toConstr :: DLetDec -> Constr Source # dataTypeOf :: DLetDec -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DLetDec) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DLetDec) Source # gmapT :: (forall b. Data b => b -> b) -> DLetDec -> DLetDec Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DLetDec -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DLetDec -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DLetDec -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DLetDec -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DLetDec -> m DLetDec Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DLetDec -> m DLetDec Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DLetDec -> m DLetDec Source # | |||||
| Generic DLetDec Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Associated Types
| |||||
| Show DLetDec Source # | |||||
| Eq DLetDec Source # | |||||
| Lift DLetDec Source # | |||||
| type Rep DLetDec Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST type Rep DLetDec = D1 ('MetaData "DLetDec" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) ((C1 ('MetaCons "DFunD" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DClause])) :+: C1 ('MetaCons "DValD" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DPat) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp))) :+: (C1 ('MetaCons "DSigD" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType)) :+: (C1 ('MetaCons "DInfixD" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Fixity) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NamespaceSpecifier) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name))) :+: C1 ('MetaCons "DPragmaD" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DPragma))))) | |||||
data NamespaceSpecifier Source #
A way to specify a namespace to look in when GHC needs to find a name's source
Constructors
| NoNamespaceSpecifier | Name may be everything; If there are two names in different namespaces, then consider both |
| TypeNamespaceSpecifier | Name should be a type-level entity, such as a data type, type alias, type family, type class, or type variable |
| DataNamespaceSpecifier | Name should be a term-level entity, such as a function, data constructor, or pattern synonym |
Instances
| Data NamespaceSpecifier | |||||
Defined in Language.Haskell.TH.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NamespaceSpecifier -> c NamespaceSpecifier Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NamespaceSpecifier Source # toConstr :: NamespaceSpecifier -> Constr Source # dataTypeOf :: NamespaceSpecifier -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NamespaceSpecifier) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NamespaceSpecifier) Source # gmapT :: (forall b. Data b => b -> b) -> NamespaceSpecifier -> NamespaceSpecifier Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NamespaceSpecifier -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NamespaceSpecifier -> r Source # gmapQ :: (forall d. Data d => d -> u) -> NamespaceSpecifier -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> NamespaceSpecifier -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NamespaceSpecifier -> m NamespaceSpecifier Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NamespaceSpecifier -> m NamespaceSpecifier Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NamespaceSpecifier -> m NamespaceSpecifier Source # | |||||
| Generic NamespaceSpecifier | |||||
Defined in Language.Haskell.TH.Syntax Associated Types
Methods from :: NamespaceSpecifier -> Rep NamespaceSpecifier x Source # to :: Rep NamespaceSpecifier x -> NamespaceSpecifier Source # | |||||
| Show NamespaceSpecifier | |||||
Defined in Language.Haskell.TH.Syntax | |||||
| Eq NamespaceSpecifier | |||||
Defined in Language.Haskell.TH.Syntax Methods (==) :: NamespaceSpecifier -> NamespaceSpecifier -> Bool Source # (/=) :: NamespaceSpecifier -> NamespaceSpecifier -> Bool Source # | |||||
| Ord NamespaceSpecifier | |||||
Defined in Language.Haskell.TH.Syntax Methods compare :: NamespaceSpecifier -> NamespaceSpecifier -> Ordering Source # (<) :: NamespaceSpecifier -> NamespaceSpecifier -> Bool Source # (<=) :: NamespaceSpecifier -> NamespaceSpecifier -> Bool Source # (>) :: NamespaceSpecifier -> NamespaceSpecifier -> Bool Source # (>=) :: NamespaceSpecifier -> NamespaceSpecifier -> Bool Source # max :: NamespaceSpecifier -> NamespaceSpecifier -> NamespaceSpecifier Source # min :: NamespaceSpecifier -> NamespaceSpecifier -> NamespaceSpecifier Source # | |||||
| Lift NamespaceSpecifier | |||||
Defined in Language.Haskell.TH.Instances Methods lift :: Quote m => NamespaceSpecifier -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => NamespaceSpecifier -> Code m NamespaceSpecifier Source # | |||||
| type Rep NamespaceSpecifier | |||||
Defined in Language.Haskell.TH.Syntax type Rep NamespaceSpecifier = D1 ('MetaData "NamespaceSpecifier" "Language.Haskell.TH.Syntax" "template-haskell" 'False) (C1 ('MetaCons "NoNamespaceSpecifier" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TypeNamespaceSpecifier" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DataNamespaceSpecifier" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
Corresponds to TH's Pat type.
Constructors
| DLitP Lit | |
| DVarP Name | |
| DConP Name [DType] [DPat] | |
| DTildeP DPat | |
| DBangP DPat | |
| DSigP DPat DType | |
| DWildP | |
| DTypeP DType | Note that |
| DInvisP DType | Note that |
Instances
| Data DPat Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DPat -> c DPat Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DPat Source # toConstr :: DPat -> Constr Source # dataTypeOf :: DPat -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DPat) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DPat) Source # gmapT :: (forall b. Data b => b -> b) -> DPat -> DPat Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DPat -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DPat -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DPat -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DPat -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DPat -> m DPat Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DPat -> m DPat Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DPat -> m DPat Source # | |||||
| Generic DPat Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Associated Types
| |||||
| Show DPat Source # | |||||
| Eq DPat Source # | |||||
| Lift DPat Source # | |||||
| type Rep DPat Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST type Rep DPat = D1 ('MetaData "DPat" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) (((C1 ('MetaCons "DLitP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Lit)) :+: C1 ('MetaCons "DVarP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name))) :+: (C1 ('MetaCons "DConP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DType]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DPat]))) :+: C1 ('MetaCons "DTildeP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DPat)))) :+: ((C1 ('MetaCons "DBangP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DPat)) :+: C1 ('MetaCons "DSigP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DPat) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType))) :+: (C1 ('MetaCons "DWildP" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DTypeP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType)) :+: C1 ('MetaCons "DInvisP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType)))))) | |||||
Corresponds to TH's Type type, used to represent
types and kinds.
Constructors
| DForallT DForallTelescope DType | |
| DConstrainedT DCxt DType | |
| DAppT DType DType | |
| DAppKindT DType DKind | |
| DSigT DType DKind | |
| DVarT Name | |
| DConT Name | |
| DArrowT | |
| DLitT TyLit | |
| DWildCardT |
Instances
| Data DType Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DType -> c DType Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DType Source # toConstr :: DType -> Constr Source # dataTypeOf :: DType -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DType) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DType) Source # gmapT :: (forall b. Data b => b -> b) -> DType -> DType Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DType -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DType -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DType -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DType -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DType -> m DType Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DType -> m DType Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DType -> m DType Source # | |||||
| Generic DType Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Associated Types
| |||||
| Show DType Source # | |||||
| Eq DType Source # | |||||
| Lift DType Source # | |||||
| Desugar Cxt DCxt Source # | |||||
| Desugar Type DType Source # | |||||
| type Rep DType Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST type Rep DType = D1 ('MetaData "DType" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) (((C1 ('MetaCons "DForallT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DForallTelescope) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType)) :+: C1 ('MetaCons "DConstrainedT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DCxt) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType))) :+: (C1 ('MetaCons "DAppT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType)) :+: (C1 ('MetaCons "DAppKindT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DKind)) :+: C1 ('MetaCons "DSigT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DKind))))) :+: ((C1 ('MetaCons "DVarT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :+: C1 ('MetaCons "DConT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name))) :+: (C1 ('MetaCons "DArrowT" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DLitT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TyLit)) :+: C1 ('MetaCons "DWildCardT" 'PrefixI 'False) (U1 :: Type -> Type))))) | |||||
data DForallTelescope Source #
The type variable binders in a forall.
Constructors
| DForallVis [DTyVarBndrUnit] | A visible |
| DForallInvis [DTyVarBndrSpec] | An invisible |
Instances
| Data DForallTelescope Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DForallTelescope -> c DForallTelescope Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DForallTelescope Source # toConstr :: DForallTelescope -> Constr Source # dataTypeOf :: DForallTelescope -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DForallTelescope) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DForallTelescope) Source # gmapT :: (forall b. Data b => b -> b) -> DForallTelescope -> DForallTelescope Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DForallTelescope -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DForallTelescope -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DForallTelescope -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DForallTelescope -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DForallTelescope -> m DForallTelescope Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DForallTelescope -> m DForallTelescope Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DForallTelescope -> m DForallTelescope Source # | |||||
| Generic DForallTelescope Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Associated Types
Methods from :: DForallTelescope -> Rep DForallTelescope x Source # to :: Rep DForallTelescope x -> DForallTelescope Source # | |||||
| Show DForallTelescope Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST | |||||
| Eq DForallTelescope Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods (==) :: DForallTelescope -> DForallTelescope -> Bool Source # (/=) :: DForallTelescope -> DForallTelescope -> Bool Source # | |||||
| Lift DForallTelescope Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods lift :: Quote m => DForallTelescope -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => DForallTelescope -> Code m DForallTelescope Source # | |||||
| type Rep DForallTelescope Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST type Rep DForallTelescope = D1 ('MetaData "DForallTelescope" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) (C1 ('MetaCons "DForallVis" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DTyVarBndrUnit])) :+: C1 ('MetaCons "DForallInvis" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DTyVarBndrSpec]))) | |||||
data DTyVarBndr flag Source #
Corresponds to TH's TyVarBndr
Instances
| Functor DTyVarBndr Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods fmap :: (a -> b) -> DTyVarBndr a -> DTyVarBndr b Source # (<$) :: a -> DTyVarBndr b -> DTyVarBndr a Source # | |||||
| Foldable DTyVarBndr Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods fold :: Monoid m => DTyVarBndr m -> m Source # foldMap :: Monoid m => (a -> m) -> DTyVarBndr a -> m Source # foldMap' :: Monoid m => (a -> m) -> DTyVarBndr a -> m Source # foldr :: (a -> b -> b) -> b -> DTyVarBndr a -> b Source # foldr' :: (a -> b -> b) -> b -> DTyVarBndr a -> b Source # foldl :: (b -> a -> b) -> b -> DTyVarBndr a -> b Source # foldl' :: (b -> a -> b) -> b -> DTyVarBndr a -> b Source # foldr1 :: (a -> a -> a) -> DTyVarBndr a -> a Source # foldl1 :: (a -> a -> a) -> DTyVarBndr a -> a Source # toList :: DTyVarBndr a -> [a] Source # null :: DTyVarBndr a -> Bool Source # length :: DTyVarBndr a -> Int Source # elem :: Eq a => a -> DTyVarBndr a -> Bool Source # maximum :: Ord a => DTyVarBndr a -> a Source # minimum :: Ord a => DTyVarBndr a -> a Source # sum :: Num a => DTyVarBndr a -> a Source # product :: Num a => DTyVarBndr a -> a Source # | |||||
| Traversable DTyVarBndr Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods traverse :: Applicative f => (a -> f b) -> DTyVarBndr a -> f (DTyVarBndr b) Source # sequenceA :: Applicative f => DTyVarBndr (f a) -> f (DTyVarBndr a) Source # mapM :: Monad m => (a -> m b) -> DTyVarBndr a -> m (DTyVarBndr b) Source # sequence :: Monad m => DTyVarBndr (m a) -> m (DTyVarBndr a) Source # | |||||
| Lift flag => Lift (DTyVarBndr flag :: Type) Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods lift :: Quote m => DTyVarBndr flag -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => DTyVarBndr flag -> Code m (DTyVarBndr flag) Source # | |||||
| Data flag => Data (DTyVarBndr flag) Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DTyVarBndr flag -> c (DTyVarBndr flag) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (DTyVarBndr flag) Source # toConstr :: DTyVarBndr flag -> Constr Source # dataTypeOf :: DTyVarBndr flag -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (DTyVarBndr flag)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (DTyVarBndr flag)) Source # gmapT :: (forall b. Data b => b -> b) -> DTyVarBndr flag -> DTyVarBndr flag Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DTyVarBndr flag -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DTyVarBndr flag -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DTyVarBndr flag -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DTyVarBndr flag -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DTyVarBndr flag -> m (DTyVarBndr flag) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DTyVarBndr flag -> m (DTyVarBndr flag) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DTyVarBndr flag -> m (DTyVarBndr flag) Source # | |||||
| Generic (DTyVarBndr flag) Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Associated Types
Methods from :: DTyVarBndr flag -> Rep (DTyVarBndr flag) x Source # to :: Rep (DTyVarBndr flag) x -> DTyVarBndr flag Source # | |||||
| Show flag => Show (DTyVarBndr flag) Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST | |||||
| Eq flag => Eq (DTyVarBndr flag) Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods (==) :: DTyVarBndr flag -> DTyVarBndr flag -> Bool Source # (/=) :: DTyVarBndr flag -> DTyVarBndr flag -> Bool Source # | |||||
| Desugar (TyVarBndr flag) (DTyVarBndr flag) Source # | This instance is only instance | ||||
Defined in Language.Haskell.TH.Desugar | |||||
| type Rep (DTyVarBndr flag) Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST type Rep (DTyVarBndr flag) = D1 ('MetaData "DTyVarBndr" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) (C1 ('MetaCons "DPlainTV" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 flag)) :+: C1 ('MetaCons "DKindedTV" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 flag) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DKind)))) | |||||
type DTyVarBndrSpec = DTyVarBndr Specificity Source #
Corresponds to TH's TyVarBndrSpec
type DTyVarBndrUnit = DTyVarBndr () Source #
Corresponds to TH's TyVarBndrUnit
data Specificity Source #
Constructors
| SpecifiedSpec | a |
| InferredSpec | {a} |
Instances
| Data Specificity | |||||
Defined in Language.Haskell.TH.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Specificity -> c Specificity Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Specificity Source # toConstr :: Specificity -> Constr Source # dataTypeOf :: Specificity -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Specificity) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Specificity) Source # gmapT :: (forall b. Data b => b -> b) -> Specificity -> Specificity Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Specificity -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Specificity -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Specificity -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Specificity -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Specificity -> m Specificity Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Specificity -> m Specificity Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Specificity -> m Specificity Source # | |||||
| Generic Specificity | |||||
Defined in Language.Haskell.TH.Syntax Associated Types
Methods from :: Specificity -> Rep Specificity x Source # to :: Rep Specificity x -> Specificity Source # | |||||
| Show Specificity | |||||
Defined in Language.Haskell.TH.Syntax | |||||
| Eq Specificity | |||||
Defined in Language.Haskell.TH.Syntax Methods (==) :: Specificity -> Specificity -> Bool Source # (/=) :: Specificity -> Specificity -> Bool Source # | |||||
| Ord Specificity | |||||
Defined in Language.Haskell.TH.Syntax Methods compare :: Specificity -> Specificity -> Ordering Source # (<) :: Specificity -> Specificity -> Bool Source # (<=) :: Specificity -> Specificity -> Bool Source # (>) :: Specificity -> Specificity -> Bool Source # (>=) :: Specificity -> Specificity -> Bool Source # max :: Specificity -> Specificity -> Specificity Source # min :: Specificity -> Specificity -> Specificity Source # | |||||
| DefaultBndrFlag Specificity | |||||
Defined in Language.Haskell.TH.Lib Methods | |||||
| PprFlag Specificity | |||||
Defined in Language.Haskell.TH.Ppr Methods pprTyVarBndr :: TyVarBndr Specificity -> Doc Source # | |||||
| Lift Specificity | |||||
Defined in Language.Haskell.TH.Instances Methods lift :: Quote m => Specificity -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => Specificity -> Code m Specificity Source # | |||||
| type Rep Specificity | |||||
type DTyVarBndrVis = DTyVarBndr BndrVis Source #
Corresponds to TH's TyVarBndrVis
Instances
| Data BndrVis | |
Defined in Language.Haskell.TH.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BndrVis -> c BndrVis Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BndrVis Source # toConstr :: BndrVis -> Constr Source # dataTypeOf :: BndrVis -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BndrVis) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BndrVis) Source # gmapT :: (forall b. Data b => b -> b) -> BndrVis -> BndrVis Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BndrVis -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BndrVis -> r Source # gmapQ :: (forall d. Data d => d -> u) -> BndrVis -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> BndrVis -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> BndrVis -> m BndrVis Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BndrVis -> m BndrVis Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BndrVis -> m BndrVis Source # | |
| Generic BndrVis | |
Defined in Language.Haskell.TH.Syntax | |
| Show BndrVis | |
| Eq BndrVis | |
| Ord BndrVis | |
Defined in Language.Haskell.TH.Syntax | |
| DefaultBndrFlag BndrVis | |
Defined in Language.Haskell.TH.Lib Methods | |
| PprFlag BndrVis | |
Defined in Language.Haskell.TH.Ppr | |
| Lift BndrVis | |
| type Rep BndrVis | |
Corresponds to TH's Match type.
Instances
| Data DMatch Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DMatch -> c DMatch Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DMatch Source # toConstr :: DMatch -> Constr Source # dataTypeOf :: DMatch -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DMatch) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DMatch) Source # gmapT :: (forall b. Data b => b -> b) -> DMatch -> DMatch Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DMatch -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DMatch -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DMatch -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DMatch -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DMatch -> m DMatch Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DMatch -> m DMatch Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DMatch -> m DMatch Source # | |||||
| Generic DMatch Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Associated Types
| |||||
| Show DMatch Source # | |||||
| Eq DMatch Source # | |||||
| Lift DMatch Source # | |||||
| type Rep DMatch Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST type Rep DMatch = D1 ('MetaData "DMatch" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) (C1 ('MetaCons "DMatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DPat) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp))) | |||||
Corresponds to TH's Clause type.
Instances
| Data DClause Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DClause -> c DClause Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DClause Source # toConstr :: DClause -> Constr Source # dataTypeOf :: DClause -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DClause) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DClause) Source # gmapT :: (forall b. Data b => b -> b) -> DClause -> DClause Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DClause -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DClause -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DClause -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DClause -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DClause -> m DClause Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DClause -> m DClause Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DClause -> m DClause Source # | |||||
| Generic DClause Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Associated Types
| |||||
| Show DClause Source # | |||||
| Eq DClause Source # | |||||
| Lift DClause Source # | |||||
| type Rep DClause Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST type Rep DClause = D1 ('MetaData "DClause" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) (C1 ('MetaCons "DClause" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DPat]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp))) | |||||
Corresponds to TH's Dec type.
Constructors
| DLetDec DLetDec | |
| DDataD DataFlavor DCxt Name [DTyVarBndrVis] (Maybe DKind) [DCon] [DDerivClause] | An ordinary (i.e., non-data family) data type declaration. Note
that desugaring upholds the following properties regarding the
|
| DTySynD Name [DTyVarBndrVis] DType | |
| DClassD DCxt Name [DTyVarBndrVis] [FunDep] [DDec] | |
| DInstanceD (Maybe Overlap) (Maybe [DTyVarBndrUnit]) DCxt DType [DDec] | Note that the |
| DForeignD DForeign | |
| DOpenTypeFamilyD DTypeFamilyHead | |
| DClosedTypeFamilyD DTypeFamilyHead [DTySynEqn] | |
| DDataFamilyD Name [DTyVarBndrVis] (Maybe DKind) | |
| DDataInstD DataFlavor DCxt (Maybe [DTyVarBndrUnit]) DType (Maybe DKind) [DCon] [DDerivClause] | A data family instance declaration. Note that desugaring
upholds the following properties regarding the
|
| DTySynInstD DTySynEqn | |
| DRoleAnnotD Name [Role] | |
| DStandaloneDerivD (Maybe DDerivStrategy) (Maybe [DTyVarBndrUnit]) DCxt DType | Note that the |
| DDefaultSigD Name DType | |
| DPatSynD Name PatSynArgs DPatSynDir DPat | |
| DPatSynSigD Name DPatSynType | |
| DKiSigD Name DKind | |
| DDefaultD [DType] |
Instances
| Data DDec Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DDec -> c DDec Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DDec Source # toConstr :: DDec -> Constr Source # dataTypeOf :: DDec -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DDec) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DDec) Source # gmapT :: (forall b. Data b => b -> b) -> DDec -> DDec Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DDec -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DDec -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DDec -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DDec -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DDec -> m DDec Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DDec -> m DDec Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DDec -> m DDec Source # | |||||
| Generic DDec Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Associated Types
| |||||
| Show DDec Source # | |||||
| Eq DDec Source # | |||||
| Lift DDec Source # | |||||
| Desugar [Dec] [DDec] Source # | |||||
| type Rep DDec Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST type Rep DDec = D1 ('MetaData "DDec" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) ((((C1 ('MetaCons "DLetDec" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DLetDec)) :+: C1 ('MetaCons "DDataD" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DataFlavor) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DCxt) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name))) :*: ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DTyVarBndrVis]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe DKind))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DCon]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DDerivClause]))))) :+: (C1 ('MetaCons "DTySynD" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DTyVarBndrVis]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType))) :+: C1 ('MetaCons "DClassD" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DCxt) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DTyVarBndrVis]) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FunDep]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DDec])))))) :+: ((C1 ('MetaCons "DInstanceD" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Overlap)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [DTyVarBndrUnit]))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DCxt) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DDec])))) :+: C1 ('MetaCons "DForeignD" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DForeign))) :+: (C1 ('MetaCons "DOpenTypeFamilyD" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DTypeFamilyHead)) :+: (C1 ('MetaCons "DClosedTypeFamilyD" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DTypeFamilyHead) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DTySynEqn])) :+: C1 ('MetaCons "DDataFamilyD" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DTyVarBndrVis]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe DKind)))))))) :+: (((C1 ('MetaCons "DDataInstD" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DataFlavor) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DCxt) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [DTyVarBndrUnit])))) :*: ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe DKind))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DCon]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DDerivClause])))) :+: C1 ('MetaCons "DTySynInstD" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DTySynEqn))) :+: (C1 ('MetaCons "DRoleAnnotD" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Role])) :+: C1 ('MetaCons "DStandaloneDerivD" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe DDerivStrategy)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [DTyVarBndrUnit]))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DCxt) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType))))) :+: ((C1 ('MetaCons "DDefaultSigD" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType)) :+: C1 ('MetaCons "DPatSynD" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PatSynArgs)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DPatSynDir) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DPat)))) :+: (C1 ('MetaCons "DPatSynSigD" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DPatSynType)) :+: (C1 ('MetaCons "DKiSigD" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DKind)) :+: C1 ('MetaCons "DDefaultD" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DType]))))))) | |||||
data DDerivClause Source #
Corresponds to TH's DerivClause type.
Constructors
| DDerivClause (Maybe DDerivStrategy) DCxt |
Instances
| Data DDerivClause Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DDerivClause -> c DDerivClause Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DDerivClause Source # toConstr :: DDerivClause -> Constr Source # dataTypeOf :: DDerivClause -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DDerivClause) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DDerivClause) Source # gmapT :: (forall b. Data b => b -> b) -> DDerivClause -> DDerivClause Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DDerivClause -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DDerivClause -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DDerivClause -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DDerivClause -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DDerivClause -> m DDerivClause Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DDerivClause -> m DDerivClause Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DDerivClause -> m DDerivClause Source # | |||||
| Generic DDerivClause Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Associated Types
Methods from :: DDerivClause -> Rep DDerivClause x Source # to :: Rep DDerivClause x -> DDerivClause Source # | |||||
| Show DDerivClause Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST | |||||
| Eq DDerivClause Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods (==) :: DDerivClause -> DDerivClause -> Bool Source # (/=) :: DDerivClause -> DDerivClause -> Bool Source # | |||||
| Lift DDerivClause Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods lift :: Quote m => DDerivClause -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => DDerivClause -> Code m DDerivClause Source # | |||||
| type Rep DDerivClause Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST type Rep DDerivClause = D1 ('MetaData "DDerivClause" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) (C1 ('MetaCons "DDerivClause" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe DDerivStrategy)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DCxt))) | |||||
data DDerivStrategy Source #
Corresponds to TH's DerivStrategy type.
Constructors
| DStockStrategy | A "standard" derived instance |
| DAnyclassStrategy | -XDeriveAnyClass |
| DNewtypeStrategy | -XGeneralizedNewtypeDeriving |
| DViaStrategy DType | -XDerivingVia |
Instances
| Data DDerivStrategy Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DDerivStrategy -> c DDerivStrategy Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DDerivStrategy Source # toConstr :: DDerivStrategy -> Constr Source # dataTypeOf :: DDerivStrategy -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DDerivStrategy) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DDerivStrategy) Source # gmapT :: (forall b. Data b => b -> b) -> DDerivStrategy -> DDerivStrategy Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DDerivStrategy -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DDerivStrategy -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DDerivStrategy -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DDerivStrategy -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DDerivStrategy -> m DDerivStrategy Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DDerivStrategy -> m DDerivStrategy Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DDerivStrategy -> m DDerivStrategy Source # | |||||
| Generic DDerivStrategy Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Associated Types
Methods from :: DDerivStrategy -> Rep DDerivStrategy x Source # to :: Rep DDerivStrategy x -> DDerivStrategy Source # | |||||
| Show DDerivStrategy Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST | |||||
| Eq DDerivStrategy Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods (==) :: DDerivStrategy -> DDerivStrategy -> Bool Source # (/=) :: DDerivStrategy -> DDerivStrategy -> Bool Source # | |||||
| Lift DDerivStrategy Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods lift :: Quote m => DDerivStrategy -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => DDerivStrategy -> Code m DDerivStrategy Source # | |||||
| type Rep DDerivStrategy Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST type Rep DDerivStrategy = D1 ('MetaData "DDerivStrategy" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) ((C1 ('MetaCons "DStockStrategy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DAnyclassStrategy" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DNewtypeStrategy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DViaStrategy" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType)))) | |||||
data DPatSynDir Source #
Corresponds to TH's PatSynDir type
Constructors
| DUnidir | pattern P x {<-} p |
| DImplBidir | pattern P x {=} p |
| DExplBidir [DClause] | pattern P x {<-} p where P x = e |
Instances
| Data DPatSynDir Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DPatSynDir -> c DPatSynDir Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DPatSynDir Source # toConstr :: DPatSynDir -> Constr Source # dataTypeOf :: DPatSynDir -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DPatSynDir) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DPatSynDir) Source # gmapT :: (forall b. Data b => b -> b) -> DPatSynDir -> DPatSynDir Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DPatSynDir -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DPatSynDir -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DPatSynDir -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DPatSynDir -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DPatSynDir -> m DPatSynDir Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DPatSynDir -> m DPatSynDir Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DPatSynDir -> m DPatSynDir Source # | |||||
| Generic DPatSynDir Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Associated Types
| |||||
| Show DPatSynDir Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST | |||||
| Eq DPatSynDir Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods (==) :: DPatSynDir -> DPatSynDir -> Bool Source # (/=) :: DPatSynDir -> DPatSynDir -> Bool Source # | |||||
| Lift DPatSynDir Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods lift :: Quote m => DPatSynDir -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => DPatSynDir -> Code m DPatSynDir Source # | |||||
| type Rep DPatSynDir Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST type Rep DPatSynDir = D1 ('MetaData "DPatSynDir" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) (C1 ('MetaCons "DUnidir" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DImplBidir" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DExplBidir" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DClause])))) | |||||
type DPatSynType = DType Source #
Corresponds to TH's PatSynType type
Varieties of allowed instance overlap.
Constructors
| Overlappable | May be overlapped by more specific instances |
| Overlapping | May overlap a more general instance |
| Overlaps | Both |
| Incoherent | Both |
Instances
| Data Overlap | |||||
Defined in Language.Haskell.TH.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Overlap -> c Overlap Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Overlap Source # toConstr :: Overlap -> Constr Source # dataTypeOf :: Overlap -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Overlap) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Overlap) Source # gmapT :: (forall b. Data b => b -> b) -> Overlap -> Overlap Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Overlap -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Overlap -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Overlap -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Overlap -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Overlap -> m Overlap Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Overlap -> m Overlap Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Overlap -> m Overlap Source # | |||||
| Generic Overlap | |||||
Defined in Language.Haskell.TH.Syntax Associated Types
| |||||
| Show Overlap | |||||
| Eq Overlap | |||||
| Ord Overlap | |||||
Defined in Language.Haskell.TH.Syntax | |||||
| Lift Overlap | |||||
| type Rep Overlap | |||||
Defined in Language.Haskell.TH.Syntax type Rep Overlap = D1 ('MetaData "Overlap" "Language.Haskell.TH.Syntax" "template-haskell" 'False) ((C1 ('MetaCons "Overlappable" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Overlapping" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Overlaps" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Incoherent" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
data PatSynArgs Source #
A pattern synonym's argument type.
Constructors
| PrefixPatSyn [Name] | pattern P {x y z} = p |
| InfixPatSyn Name Name | pattern {x P y} = p |
| RecordPatSyn [Name] | pattern P { {x,y,z} } = p |
Instances
| Data PatSynArgs | |||||
Defined in Language.Haskell.TH.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PatSynArgs -> c PatSynArgs Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PatSynArgs Source # toConstr :: PatSynArgs -> Constr Source # dataTypeOf :: PatSynArgs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PatSynArgs) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PatSynArgs) Source # gmapT :: (forall b. Data b => b -> b) -> PatSynArgs -> PatSynArgs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PatSynArgs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PatSynArgs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> PatSynArgs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> PatSynArgs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PatSynArgs -> m PatSynArgs Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PatSynArgs -> m PatSynArgs Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PatSynArgs -> m PatSynArgs Source # | |||||
| Generic PatSynArgs | |||||
Defined in Language.Haskell.TH.Syntax Associated Types
| |||||
| Show PatSynArgs | |||||
Defined in Language.Haskell.TH.Syntax | |||||
| Eq PatSynArgs | |||||
Defined in Language.Haskell.TH.Syntax Methods (==) :: PatSynArgs -> PatSynArgs -> Bool Source # (/=) :: PatSynArgs -> PatSynArgs -> Bool Source # | |||||
| Ord PatSynArgs | |||||
Defined in Language.Haskell.TH.Syntax Methods compare :: PatSynArgs -> PatSynArgs -> Ordering Source # (<) :: PatSynArgs -> PatSynArgs -> Bool Source # (<=) :: PatSynArgs -> PatSynArgs -> Bool Source # (>) :: PatSynArgs -> PatSynArgs -> Bool Source # (>=) :: PatSynArgs -> PatSynArgs -> Bool Source # max :: PatSynArgs -> PatSynArgs -> PatSynArgs Source # min :: PatSynArgs -> PatSynArgs -> PatSynArgs Source # | |||||
| Ppr PatSynArgs | |||||
Defined in Language.Haskell.TH.Ppr | |||||
| Lift PatSynArgs | |||||
Defined in Language.Haskell.TH.Instances Methods lift :: Quote m => PatSynArgs -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => PatSynArgs -> Code m PatSynArgs Source # | |||||
| type Rep PatSynArgs | |||||
Defined in Language.Haskell.TH.Syntax type Rep PatSynArgs = D1 ('MetaData "PatSynArgs" "Language.Haskell.TH.Syntax" "template-haskell" 'False) (C1 ('MetaCons "PrefixPatSyn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Name])) :+: (C1 ('MetaCons "InfixPatSyn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :+: C1 ('MetaCons "RecordPatSyn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Name])))) | |||||
data DataFlavor Source #
Is a data type or data instance declaration a newtype declaration, a
data declaration, or a type data declaration?
Instances
| Data DataFlavor Source # | |||||
Defined in Language.Haskell.TH.Desugar.Util Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DataFlavor -> c DataFlavor Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DataFlavor Source # toConstr :: DataFlavor -> Constr Source # dataTypeOf :: DataFlavor -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DataFlavor) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DataFlavor) Source # gmapT :: (forall b. Data b => b -> b) -> DataFlavor -> DataFlavor Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DataFlavor -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DataFlavor -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DataFlavor -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DataFlavor -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DataFlavor -> m DataFlavor Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DataFlavor -> m DataFlavor Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DataFlavor -> m DataFlavor Source # | |||||
| Generic DataFlavor Source # | |||||
Defined in Language.Haskell.TH.Desugar.Util Associated Types
| |||||
| Show DataFlavor Source # | |||||
Defined in Language.Haskell.TH.Desugar.Util | |||||
| Eq DataFlavor Source # | |||||
Defined in Language.Haskell.TH.Desugar.Util Methods (==) :: DataFlavor -> DataFlavor -> Bool Source # (/=) :: DataFlavor -> DataFlavor -> Bool Source # | |||||
| Lift DataFlavor Source # | |||||
Defined in Language.Haskell.TH.Desugar.Util Methods lift :: Quote m => DataFlavor -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => DataFlavor -> Code m DataFlavor Source # | |||||
| type Rep DataFlavor Source # | |||||
Defined in Language.Haskell.TH.Desugar.Util type Rep DataFlavor = D1 ('MetaData "DataFlavor" "Language.Haskell.TH.Desugar.Util" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) (C1 ('MetaCons "Newtype" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Data" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeData" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
data DTypeFamilyHead Source #
Corresponds to TH's TypeFamilyHead type
Constructors
| DTypeFamilyHead Name [DTyVarBndrVis] DFamilyResultSig (Maybe InjectivityAnn) |
Instances
| Data DTypeFamilyHead Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DTypeFamilyHead -> c DTypeFamilyHead Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DTypeFamilyHead Source # toConstr :: DTypeFamilyHead -> Constr Source # dataTypeOf :: DTypeFamilyHead -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DTypeFamilyHead) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DTypeFamilyHead) Source # gmapT :: (forall b. Data b => b -> b) -> DTypeFamilyHead -> DTypeFamilyHead Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DTypeFamilyHead -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DTypeFamilyHead -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DTypeFamilyHead -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DTypeFamilyHead -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DTypeFamilyHead -> m DTypeFamilyHead Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DTypeFamilyHead -> m DTypeFamilyHead Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DTypeFamilyHead -> m DTypeFamilyHead Source # | |||||
| Generic DTypeFamilyHead Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Associated Types
Methods from :: DTypeFamilyHead -> Rep DTypeFamilyHead x Source # to :: Rep DTypeFamilyHead x -> DTypeFamilyHead Source # | |||||
| Show DTypeFamilyHead Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST | |||||
| Eq DTypeFamilyHead Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods (==) :: DTypeFamilyHead -> DTypeFamilyHead -> Bool Source # (/=) :: DTypeFamilyHead -> DTypeFamilyHead -> Bool Source # | |||||
| Lift DTypeFamilyHead Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods lift :: Quote m => DTypeFamilyHead -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => DTypeFamilyHead -> Code m DTypeFamilyHead Source # | |||||
| type Rep DTypeFamilyHead Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST type Rep DTypeFamilyHead = D1 ('MetaData "DTypeFamilyHead" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) (C1 ('MetaCons "DTypeFamilyHead" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DTyVarBndrVis])) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DFamilyResultSig) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe InjectivityAnn))))) | |||||
data DFamilyResultSig Source #
Corresponds to TH's FamilyResultSig type
Constructors
| DNoSig | |
| DKindSig DKind | |
| DTyVarSig DTyVarBndrUnit |
Instances
| Data DFamilyResultSig Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DFamilyResultSig -> c DFamilyResultSig Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DFamilyResultSig Source # toConstr :: DFamilyResultSig -> Constr Source # dataTypeOf :: DFamilyResultSig -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DFamilyResultSig) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DFamilyResultSig) Source # gmapT :: (forall b. Data b => b -> b) -> DFamilyResultSig -> DFamilyResultSig Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DFamilyResultSig -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DFamilyResultSig -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DFamilyResultSig -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DFamilyResultSig -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DFamilyResultSig -> m DFamilyResultSig Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DFamilyResultSig -> m DFamilyResultSig Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DFamilyResultSig -> m DFamilyResultSig Source # | |||||
| Generic DFamilyResultSig Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Associated Types
Methods from :: DFamilyResultSig -> Rep DFamilyResultSig x Source # to :: Rep DFamilyResultSig x -> DFamilyResultSig Source # | |||||
| Show DFamilyResultSig Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST | |||||
| Eq DFamilyResultSig Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods (==) :: DFamilyResultSig -> DFamilyResultSig -> Bool Source # (/=) :: DFamilyResultSig -> DFamilyResultSig -> Bool Source # | |||||
| Lift DFamilyResultSig Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods lift :: Quote m => DFamilyResultSig -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => DFamilyResultSig -> Code m DFamilyResultSig Source # | |||||
| type Rep DFamilyResultSig Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST type Rep DFamilyResultSig = D1 ('MetaData "DFamilyResultSig" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) (C1 ('MetaCons "DNoSig" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DKindSig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DKind)) :+: C1 ('MetaCons "DTyVarSig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DTyVarBndrUnit)))) | |||||
data InjectivityAnn Source #
Injectivity annotation
Constructors
| InjectivityAnn Name [Name] |
Instances
| Data InjectivityAnn | |||||
Defined in Language.Haskell.TH.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> InjectivityAnn -> c InjectivityAnn Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c InjectivityAnn Source # toConstr :: InjectivityAnn -> Constr Source # dataTypeOf :: InjectivityAnn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c InjectivityAnn) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InjectivityAnn) Source # gmapT :: (forall b. Data b => b -> b) -> InjectivityAnn -> InjectivityAnn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InjectivityAnn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InjectivityAnn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> InjectivityAnn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> InjectivityAnn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> InjectivityAnn -> m InjectivityAnn Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InjectivityAnn -> m InjectivityAnn Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InjectivityAnn -> m InjectivityAnn Source # | |||||
| Generic InjectivityAnn | |||||
Defined in Language.Haskell.TH.Syntax Associated Types
Methods from :: InjectivityAnn -> Rep InjectivityAnn x Source # to :: Rep InjectivityAnn x -> InjectivityAnn Source # | |||||
| Show InjectivityAnn | |||||
Defined in Language.Haskell.TH.Syntax | |||||
| Eq InjectivityAnn | |||||
Defined in Language.Haskell.TH.Syntax Methods (==) :: InjectivityAnn -> InjectivityAnn -> Bool Source # (/=) :: InjectivityAnn -> InjectivityAnn -> Bool Source # | |||||
| Ord InjectivityAnn | |||||
Defined in Language.Haskell.TH.Syntax Methods compare :: InjectivityAnn -> InjectivityAnn -> Ordering Source # (<) :: InjectivityAnn -> InjectivityAnn -> Bool Source # (<=) :: InjectivityAnn -> InjectivityAnn -> Bool Source # (>) :: InjectivityAnn -> InjectivityAnn -> Bool Source # (>=) :: InjectivityAnn -> InjectivityAnn -> Bool Source # max :: InjectivityAnn -> InjectivityAnn -> InjectivityAnn Source # min :: InjectivityAnn -> InjectivityAnn -> InjectivityAnn Source # | |||||
| Ppr InjectivityAnn | |||||
Defined in Language.Haskell.TH.Ppr | |||||
| Lift InjectivityAnn | |||||
Defined in Language.Haskell.TH.Instances Methods lift :: Quote m => InjectivityAnn -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => InjectivityAnn -> Code m InjectivityAnn Source # | |||||
| type Rep InjectivityAnn | |||||
Defined in Language.Haskell.TH.Syntax type Rep InjectivityAnn = D1 ('MetaData "InjectivityAnn" "Language.Haskell.TH.Syntax" "template-haskell" 'False) (C1 ('MetaCons "InjectivityAnn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Name]))) | |||||
Corresponds to TH's Con type. Unlike Con, all DCons reflect GADT
syntax. This is beneficial for th-desugar's since it means
that all data type declarations can support explicit return kinds, so
one does not need to represent them with something like ,
since Haskell98-style data declaration syntax isn't used. Accordingly,
there are some differences between Maybe DKindDCon and Con to keep in mind:
- Unlike
ForallC, where the meaning of theTyVarBndrs changes depending on whether it's followed byGadtC/RecGadtCor not, the meaning of theDTyVarBndrs in aDConis always the same: it is the list of universally and existentially quantified type variables. Note that it is not guaranteed that one set of type variables will appear before the other. - A
DConalways has an explicit return type.
Constructors
| DCon [DTyVarBndrSpec] DCxt Name DConFields DType | The GADT result type |
Instances
| Data DCon Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DCon -> c DCon Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DCon Source # toConstr :: DCon -> Constr Source # dataTypeOf :: DCon -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DCon) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DCon) Source # gmapT :: (forall b. Data b => b -> b) -> DCon -> DCon Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DCon -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DCon -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DCon -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DCon -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DCon -> m DCon Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DCon -> m DCon Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DCon -> m DCon Source # | |||||
| Generic DCon Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Associated Types
| |||||
| Show DCon Source # | |||||
| Eq DCon Source # | |||||
| Lift DCon Source # | |||||
| type Rep DCon Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST type Rep DCon = D1 ('MetaData "DCon" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) (C1 ('MetaCons "DCon" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DTyVarBndrSpec]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DCxt)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DConFields) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType))))) | |||||
data DConFields Source #
A list of fields either for a standard data constructor or a record data constructor.
Constructors
| DNormalC DDeclaredInfix [DBangType] | |
| DRecC [DVarBangType] |
Instances
| Data DConFields Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DConFields -> c DConFields Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DConFields Source # toConstr :: DConFields -> Constr Source # dataTypeOf :: DConFields -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DConFields) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DConFields) Source # gmapT :: (forall b. Data b => b -> b) -> DConFields -> DConFields Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DConFields -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DConFields -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DConFields -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DConFields -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DConFields -> m DConFields Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DConFields -> m DConFields Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DConFields -> m DConFields Source # | |||||
| Generic DConFields Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Associated Types
| |||||
| Show DConFields Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST | |||||
| Eq DConFields Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods (==) :: DConFields -> DConFields -> Bool Source # (/=) :: DConFields -> DConFields -> Bool Source # | |||||
| Lift DConFields Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods lift :: Quote m => DConFields -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => DConFields -> Code m DConFields Source # | |||||
| type Rep DConFields Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST type Rep DConFields = D1 ('MetaData "DConFields" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) (C1 ('MetaCons "DNormalC" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DDeclaredInfix) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DBangType])) :+: C1 ('MetaCons "DRecC" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DVarBangType]))) | |||||
type DDeclaredInfix = Bool Source #
True if a constructor is declared infix. For normal ADTs, this means
that is was written in infix style. For example, both of the constructors
below are declared infix.
data Infix = Int Infix Int | Int :*: Int
Whereas neither of these constructors are declared infix:
data Prefix = Prefix Int Int | (:+:) Int Int
For GADTs, detecting whether a constructor is declared infix is a bit trickier, as one cannot write a GADT constructor "infix-style" like one can for normal ADT constructors. GHC considers a GADT constructor to be declared infix if it meets the following three criteria:
- Its name uses operator syntax (e.g.,
(:*:)). - It has exactly two fields (without record syntax).
- It has a programmer-specified fixity declaration.
For example, in the following GADT:
infixl 5 :**:, :&&:, :^^:, ActuallyPrefix
data InfixGADT a where
(:**:) :: Int -> b -> InfixGADT (Maybe b) -- Only this one is infix
ActuallyPrefix :: Char -> Bool -> InfixGADT Double
(:&&:) :: { infixGADT1 :: b, infixGADT2 :: Int } -> InfixGADT b :: Int -> Int -> Int -> InfixGADT Int
(:!!:) :: Char -> Char -> InfixGADT Char
Only the (:**:) constructor is declared infix. The other constructors
are not declared infix, because:
ActuallyPrefixdoes not use operator syntax (criterion 1).(:&&:)uses record syntax (criterion 2).(:^^:)does not have exactly two fields (criterion 2).(:!!:)does not have a programmer-specified fixity declaration (criterion 3).
Constructors
| Bang SourceUnpackedness SourceStrictness | C { {-# UNPACK #-} !}a |
Instances
| Data Bang | |||||
Defined in Language.Haskell.TH.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Bang -> c Bang Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Bang Source # toConstr :: Bang -> Constr Source # dataTypeOf :: Bang -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Bang) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Bang) Source # gmapT :: (forall b. Data b => b -> b) -> Bang -> Bang Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bang -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bang -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Bang -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Bang -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Bang -> m Bang Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Bang -> m Bang Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Bang -> m Bang Source # | |||||
| Generic Bang | |||||
Defined in Language.Haskell.TH.Syntax Associated Types
| |||||
| Show Bang | |||||
| Eq Bang | |||||
| Ord Bang | |||||
Defined in Language.Haskell.TH.Syntax | |||||
| Ppr Bang | |||||
| Lift Bang | |||||
| type Rep Bang | |||||
Defined in Language.Haskell.TH.Syntax type Rep Bang = D1 ('MetaData "Bang" "Language.Haskell.TH.Syntax" "template-haskell" 'False) (C1 ('MetaCons "Bang" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceUnpackedness) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SourceStrictness))) | |||||
data SourceUnpackedness Source #
SourceUnpackedness corresponds to unpack annotations found in the source code.
This may not agree with the annotations returned by reifyConStrictness.
See reifyConStrictness for more information.
Constructors
| NoSourceUnpackedness | C a |
| SourceNoUnpack | C { {-# NOUNPACK #-} } a |
| SourceUnpack | C { {-# UNPACK #-} } a |
Instances
| Data SourceUnpackedness | |||||
Defined in Language.Haskell.TH.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourceUnpackedness -> c SourceUnpackedness Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourceUnpackedness Source # toConstr :: SourceUnpackedness -> Constr Source # dataTypeOf :: SourceUnpackedness -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourceUnpackedness) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourceUnpackedness) Source # gmapT :: (forall b. Data b => b -> b) -> SourceUnpackedness -> SourceUnpackedness Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourceUnpackedness -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourceUnpackedness -> r Source # gmapQ :: (forall d. Data d => d -> u) -> SourceUnpackedness -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> SourceUnpackedness -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourceUnpackedness -> m SourceUnpackedness Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceUnpackedness -> m SourceUnpackedness Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceUnpackedness -> m SourceUnpackedness Source # | |||||
| Generic SourceUnpackedness | |||||
Defined in Language.Haskell.TH.Syntax Associated Types
Methods from :: SourceUnpackedness -> Rep SourceUnpackedness x Source # to :: Rep SourceUnpackedness x -> SourceUnpackedness Source # | |||||
| Show SourceUnpackedness | |||||
Defined in Language.Haskell.TH.Syntax | |||||
| Eq SourceUnpackedness | |||||
Defined in Language.Haskell.TH.Syntax Methods (==) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source # (/=) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source # | |||||
| Ord SourceUnpackedness | |||||
Defined in Language.Haskell.TH.Syntax Methods compare :: SourceUnpackedness -> SourceUnpackedness -> Ordering Source # (<) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source # (<=) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source # (>) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source # (>=) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source # max :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness Source # min :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness Source # | |||||
| Ppr SourceUnpackedness | |||||
Defined in Language.Haskell.TH.Ppr | |||||
| Lift SourceUnpackedness | |||||
Defined in Language.Haskell.TH.Instances Methods lift :: Quote m => SourceUnpackedness -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => SourceUnpackedness -> Code m SourceUnpackedness Source # | |||||
| type Rep SourceUnpackedness | |||||
Defined in Language.Haskell.TH.Syntax type Rep SourceUnpackedness = D1 ('MetaData "SourceUnpackedness" "Language.Haskell.TH.Syntax" "template-haskell" 'False) (C1 ('MetaCons "NoSourceUnpackedness" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SourceNoUnpack" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SourceUnpack" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
data SourceStrictness Source #
SourceStrictness corresponds to strictness annotations found in the source code.
This may not agree with the annotations returned by reifyConStrictness.
See reifyConStrictness for more information.
Constructors
| NoSourceStrictness | C a |
| SourceLazy | C {~}a |
| SourceStrict | C {!}a |
Instances
| Data SourceStrictness | |||||
Defined in Language.Haskell.TH.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourceStrictness -> c SourceStrictness Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourceStrictness Source # toConstr :: SourceStrictness -> Constr Source # dataTypeOf :: SourceStrictness -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourceStrictness) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourceStrictness) Source # gmapT :: (forall b. Data b => b -> b) -> SourceStrictness -> SourceStrictness Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourceStrictness -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourceStrictness -> r Source # gmapQ :: (forall d. Data d => d -> u) -> SourceStrictness -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> SourceStrictness -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourceStrictness -> m SourceStrictness Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceStrictness -> m SourceStrictness Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceStrictness -> m SourceStrictness Source # | |||||
| Generic SourceStrictness | |||||
Defined in Language.Haskell.TH.Syntax Associated Types
Methods from :: SourceStrictness -> Rep SourceStrictness x Source # to :: Rep SourceStrictness x -> SourceStrictness Source # | |||||
| Show SourceStrictness | |||||
Defined in Language.Haskell.TH.Syntax | |||||
| Eq SourceStrictness | |||||
Defined in Language.Haskell.TH.Syntax Methods (==) :: SourceStrictness -> SourceStrictness -> Bool Source # (/=) :: SourceStrictness -> SourceStrictness -> Bool Source # | |||||
| Ord SourceStrictness | |||||
Defined in Language.Haskell.TH.Syntax Methods compare :: SourceStrictness -> SourceStrictness -> Ordering Source # (<) :: SourceStrictness -> SourceStrictness -> Bool Source # (<=) :: SourceStrictness -> SourceStrictness -> Bool Source # (>) :: SourceStrictness -> SourceStrictness -> Bool Source # (>=) :: SourceStrictness -> SourceStrictness -> Bool Source # max :: SourceStrictness -> SourceStrictness -> SourceStrictness Source # min :: SourceStrictness -> SourceStrictness -> SourceStrictness Source # | |||||
| Ppr SourceStrictness | |||||
Defined in Language.Haskell.TH.Ppr | |||||
| Lift SourceStrictness | |||||
Defined in Language.Haskell.TH.Instances Methods lift :: Quote m => SourceStrictness -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => SourceStrictness -> Code m SourceStrictness Source # | |||||
| type Rep SourceStrictness | |||||
Defined in Language.Haskell.TH.Syntax type Rep SourceStrictness = D1 ('MetaData "SourceStrictness" "Language.Haskell.TH.Syntax" "template-haskell" 'False) (C1 ('MetaCons "NoSourceStrictness" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SourceLazy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SourceStrict" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
Corresponds to TH's Foreign type.
Instances
| Data DForeign Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DForeign -> c DForeign Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DForeign Source # toConstr :: DForeign -> Constr Source # dataTypeOf :: DForeign -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DForeign) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DForeign) Source # gmapT :: (forall b. Data b => b -> b) -> DForeign -> DForeign Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DForeign -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DForeign -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DForeign -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DForeign -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DForeign -> m DForeign Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DForeign -> m DForeign Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DForeign -> m DForeign Source # | |||||
| Generic DForeign Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Associated Types
| |||||
| Show DForeign Source # | |||||
| Eq DForeign Source # | |||||
| Lift DForeign Source # | |||||
| type Rep DForeign Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST type Rep DForeign = D1 ('MetaData "DForeign" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) (C1 ('MetaCons "DImportF" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Callconv) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Safety)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType)))) :+: C1 ('MetaCons "DExportF" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Callconv) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType)))) | |||||
Corresponds to TH's Pragma type.
Constructors
| DInlineP Name Inline RuleMatch Phases | |
| DSpecialiseP Name DType (Maybe Inline) Phases | |
| DSpecialiseInstP DType | |
| DRuleP String (Maybe [DTyVarBndrUnit]) [DRuleBndr] DExp DExp Phases | |
| DAnnP AnnTarget DExp | |
| DLineP Int String | |
| DCompleteP [Name] (Maybe Name) | |
| DOpaqueP Name | |
| DSCCP Name (Maybe String) |
Instances
| Data DPragma Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DPragma -> c DPragma Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DPragma Source # toConstr :: DPragma -> Constr Source # dataTypeOf :: DPragma -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DPragma) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DPragma) Source # gmapT :: (forall b. Data b => b -> b) -> DPragma -> DPragma Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DPragma -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DPragma -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DPragma -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DPragma -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DPragma -> m DPragma Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DPragma -> m DPragma Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DPragma -> m DPragma Source # | |||||
| Generic DPragma Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Associated Types
| |||||
| Show DPragma Source # | |||||
| Eq DPragma Source # | |||||
| Lift DPragma Source # | |||||
| type Rep DPragma Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST type Rep DPragma = D1 ('MetaData "DPragma" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) (((C1 ('MetaCons "DInlineP" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Inline)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RuleMatch) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Phases))) :+: C1 ('MetaCons "DSpecialiseP" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Inline)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Phases)))) :+: (C1 ('MetaCons "DSpecialiseInstP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType)) :+: C1 ('MetaCons "DRuleP" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [DTyVarBndrUnit])) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DRuleBndr]))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Phases)))))) :+: ((C1 ('MetaCons "DAnnP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AnnTarget) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp)) :+: C1 ('MetaCons "DLineP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))) :+: (C1 ('MetaCons "DCompleteP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Name]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Name))) :+: (C1 ('MetaCons "DOpaqueP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :+: C1 ('MetaCons "DSCCP" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String))))))) | |||||
Corresponds to TH's RuleBndr type.
Constructors
| DRuleVar Name | |
| DTypedRuleVar Name DType |
Instances
| Data DRuleBndr Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DRuleBndr -> c DRuleBndr Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DRuleBndr Source # toConstr :: DRuleBndr -> Constr Source # dataTypeOf :: DRuleBndr -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DRuleBndr) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DRuleBndr) Source # gmapT :: (forall b. Data b => b -> b) -> DRuleBndr -> DRuleBndr Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DRuleBndr -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DRuleBndr -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DRuleBndr -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DRuleBndr -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DRuleBndr -> m DRuleBndr Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DRuleBndr -> m DRuleBndr Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DRuleBndr -> m DRuleBndr Source # | |||||
| Generic DRuleBndr Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Associated Types
| |||||
| Show DRuleBndr Source # | |||||
| Eq DRuleBndr Source # | |||||
| Lift DRuleBndr Source # | |||||
| type Rep DRuleBndr Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST type Rep DRuleBndr = D1 ('MetaData "DRuleBndr" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) (C1 ('MetaCons "DRuleVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :+: C1 ('MetaCons "DTypedRuleVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType))) | |||||
Corresponds to TH's TySynEqn type (to store type family equations).
Constructors
| DTySynEqn (Maybe [DTyVarBndrUnit]) DType DType |
Instances
| Data DTySynEqn Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DTySynEqn -> c DTySynEqn Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DTySynEqn Source # toConstr :: DTySynEqn -> Constr Source # dataTypeOf :: DTySynEqn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DTySynEqn) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DTySynEqn) Source # gmapT :: (forall b. Data b => b -> b) -> DTySynEqn -> DTySynEqn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DTySynEqn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DTySynEqn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DTySynEqn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DTySynEqn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DTySynEqn -> m DTySynEqn Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DTySynEqn -> m DTySynEqn Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DTySynEqn -> m DTySynEqn Source # | |||||
| Generic DTySynEqn Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Associated Types
| |||||
| Show DTySynEqn Source # | |||||
| Eq DTySynEqn Source # | |||||
| Lift DTySynEqn Source # | |||||
| type Rep DTySynEqn Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST type Rep DTySynEqn = D1 ('MetaData "DTySynEqn" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) (C1 ('MetaCons "DTySynEqn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [DTyVarBndrUnit])) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType)))) | |||||
Corresponds to TH's Info type.
Constructors
| DTyConI DDec (Maybe [DInstanceDec]) | |
| DVarI Name DType (Maybe Name) | The |
| DTyVarI Name DKind | |
| DPrimTyConI Name Int Bool | The |
| DPatSynI Name DPatSynType |
Instances
| Data DInfo Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DInfo -> c DInfo Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DInfo Source # toConstr :: DInfo -> Constr Source # dataTypeOf :: DInfo -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DInfo) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DInfo) Source # gmapT :: (forall b. Data b => b -> b) -> DInfo -> DInfo Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DInfo -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DInfo -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DInfo -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DInfo -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DInfo -> m DInfo Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DInfo -> m DInfo Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DInfo -> m DInfo Source # | |||||
| Generic DInfo Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST Associated Types
| |||||
| Show DInfo Source # | |||||
| Eq DInfo Source # | |||||
| Lift DInfo Source # | |||||
| type Rep DInfo Source # | |||||
Defined in Language.Haskell.TH.Desugar.AST type Rep DInfo = D1 ('MetaData "DInfo" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) ((C1 ('MetaCons "DTyConI" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DDec) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [DInstanceDec]))) :+: C1 ('MetaCons "DVarI" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Name))))) :+: (C1 ('MetaCons "DTyVarI" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DKind)) :+: (C1 ('MetaCons "DPrimTyConI" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) :+: C1 ('MetaCons "DPatSynI" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DPatSynType))))) | |||||
type DInstanceDec Source #
Arguments
| = DDec | Guaranteed to be an instance declaration |
Role annotations
Constructors
| NominalR | nominal |
| RepresentationalR | representational |
| PhantomR | phantom |
| InferR | _ |
Instances
| Data Role | |||||
Defined in Language.Haskell.TH.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Role -> c Role Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Role Source # toConstr :: Role -> Constr Source # dataTypeOf :: Role -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Role) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role) Source # gmapT :: (forall b. Data b => b -> b) -> Role -> Role Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Role -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Role -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Role -> m Role Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role Source # | |||||
| Generic Role | |||||
Defined in Language.Haskell.TH.Syntax Associated Types
| |||||
| Show Role | |||||
| Eq Role | |||||
| Ord Role | |||||
Defined in Language.Haskell.TH.Syntax | |||||
| Ppr Role | |||||
| Lift Role | |||||
| type Rep Role | |||||
Defined in Language.Haskell.TH.Syntax type Rep Role = D1 ('MetaData "Role" "Language.Haskell.TH.Syntax" "template-haskell" 'False) ((C1 ('MetaCons "NominalR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RepresentationalR" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PhantomR" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "InferR" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
Constructors
| ModuleAnnotation | |
| TypeAnnotation Name | |
| ValueAnnotation Name |
Instances
| Data AnnTarget | |||||
Defined in Language.Haskell.TH.Syntax Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AnnTarget -> c AnnTarget Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnTarget Source # toConstr :: AnnTarget -> Constr Source # dataTypeOf :: AnnTarget -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnTarget) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnTarget) Source # gmapT :: (forall b. Data b => b -> b) -> AnnTarget -> AnnTarget Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnTarget -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnTarget -> r Source # gmapQ :: (forall d. Data d => d -> u) -> AnnTarget -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnTarget -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnTarget -> m AnnTarget Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnTarget -> m AnnTarget Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnTarget -> m AnnTarget Source # | |||||
| Generic AnnTarget | |||||
Defined in Language.Haskell.TH.Syntax Associated Types
| |||||
| Show AnnTarget | |||||
| Eq AnnTarget | |||||
| Ord AnnTarget | |||||
Defined in Language.Haskell.TH.Syntax | |||||
| Lift AnnTarget | |||||
| type Rep AnnTarget | |||||
Defined in Language.Haskell.TH.Syntax type Rep AnnTarget = D1 ('MetaData "AnnTarget" "Language.Haskell.TH.Syntax" "template-haskell" 'False) (C1 ('MetaCons "ModuleAnnotation" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TypeAnnotation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :+: C1 ('MetaCons "ValueAnnotation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)))) | |||||
The Desugar class
class Desugar th ds | ds -> th where Source #
This class relates a TH type with its th-desugar type and allows conversions back and forth. The functional dependency goes only one way because we define the following instances on old versions of GHC:
instanceDesugarTyVarBndrSpecDTyVarBndrSpecinstanceDesugarTyVarBndrUnitDTyVarBndrUnit
Prior to GHC 9.0, TyVarBndrSpec and TyVarBndrUnit are simply type
synonyms for TyVarBndr, so making the functional dependencies
bidirectional would cause these instances to be rejected.
Instances
| Desugar Cxt DCxt Source # | |
| Desugar Exp DExp Source # | |
| Desugar Type DType Source # | |
| Desugar TypeArg DTypeArg Source # | |
| Desugar (TyVarBndr flag) (DTyVarBndr flag) Source # | This instance is only instance |
Defined in Language.Haskell.TH.Desugar | |
| Desugar [Dec] [DDec] Source # | |
Main desugaring functions
dsPatOverExp :: DsMonad q => Pat -> DExp -> q (DPat, DExp) Source #
Desugar a pattern, along with processing a (desugared) expression that is the entire scope of the variables bound in the pattern.
dsPatsOverExp :: DsMonad q => [Pat] -> DExp -> q ([DPat], DExp) Source #
Desugar multiple patterns. Like dsPatOverExp.
dsPatX :: DsMonad q => Pat -> q (DPat, [(Name, DExp)]) Source #
Desugar a pattern, returning a list of (Name, DExp) pairs of extra variables that must be bound within the scope of the pattern
dsLetDecs :: DsMonad q => [Dec] -> q ([DLetDec], DExp -> DExp) Source #
Desugar Decs that can appear in a let expression. See the
documentation for dsLetDec for an explanation of what the return type
represents.
dsTvb :: DsMonad q => TyVarBndr_ flag -> q (DTyVarBndr flag) Source #
Desugar a TyVarBndr.
dsTvbSpec :: DsMonad q => TyVarBndrSpec -> q DTyVarBndrSpec Source #
Desugar a TyVarBndrSpec.
dsTvbUnit :: DsMonad q => TyVarBndrUnit -> q DTyVarBndrUnit Source #
Desugar a TyVarBndrUnit.
dsTvbVis :: DsMonad q => TyVarBndrVis -> q DTyVarBndrVis Source #
Desugar a TyVarBndrVis.
Arguments
| :: DsMonad q | |
| => [DTyVarBndrVis] | The universally quantified type variables (used if desugaring a non-GADT constructor). |
| -> DType | The original data declaration's type (used if desugaring a non-GADT constructor). |
| -> Con | |
| -> q [DCon] |
Desugar a single Con.
Because we always desugar Cons to GADT syntax (see the documentation for
DCon), it is not always possible to desugar with just a Con alone.
For instance, we must desugar:
data Foo a = forall b. MkFoo b
To this:
data Foo a :: Type where MkFoo :: forall a b. b -> Foo a
If our only argument was forall b. MkFoo b, it would be somewhat awkward
to figure out (1) what the set of universally quantified type variables
([a]) was, and (2) what the return type (Foo a) was. For this reason,
we require passing these as arguments. (If we desugar an actual GADT
constructor, these arguments are ignored.)
Secondary desugaring functions
type PatM (q :: Type -> Type) = WriterT [(Name, DExp)] q Source #
Desugaring a pattern also returns the list of variables bound in as-patterns and the values they should be bound to. This variables must be brought into scope in the "body" of the pattern.
dsDec :: DsMonad q => Dec -> q [DDec] Source #
Desugar a single Dec, perhaps producing multiple DDecs
dsDataDec :: DsMonad q => DataFlavor -> Cxt -> Name -> [TyVarBndrVis] -> Maybe Kind -> [Con] -> [DerivingClause] -> q [DDec] Source #
dsDataInstDec :: DsMonad q => DataFlavor -> Cxt -> Name -> Maybe [TyVarBndrUnit] -> [TypeArg] -> Maybe Kind -> [Con] -> [DerivingClause] -> q [DDec] Source #
Desugar a DataInstD or a NewtypeInstD.
type DerivingClause = DerivClause Source #
A backwards-compatible type synonym for the thing representing a single
derived class in a deriving clause. (This is a DerivClause, Pred, or
Name depending on the GHC version.)
dsDerivClause :: DsMonad q => DerivingClause -> q DDerivClause Source #
Desugar a DerivingClause.
dsLetDec :: DsMonad q => Dec -> q ([DLetDec], DExp -> DExp) Source #
Desugar a single Dec that can appear in a let expression.
This produces the following output:
- One or more
DLetDecs (a singleDeccan produce multipleDLetDecs in the event of a value declaration that binds multiple things by way of pattern matching. - A function of type
, which should be applied to the expression immediately following theDExp->DExpDLetDecs. This function prepends binding forms for any implicit params that were bound in the argumentDec. (If no implicit params are bound, this is simply theidfunction.)
For instance, if the argument to dsLetDec is the ?x = 42 part of this
expression:
let { ?x = 42 } in ?x
Then the output is:
let new_x_val = 42
\z ->
bindIP@"x" new_x_val z
This way, the expression
let { new_x_val = 42 } in can be
formed. The implicit param binders always come after all the other
bindIP @"x" new_x_val (ip @"x")DLetDecs to support parallel assignment of implicit params.
Arguments
| :: DsMonad q | |
| => Name | Name of the scrutinee, which must be a bare var |
| -> [Match] | Matches of the |
| -> q [DMatch] |
Desugar a list of matches for a case statement
Arguments
| :: DsMonad q | |
| => Body | body to desugar |
| -> [Dec] | "where" declarations |
| -> DExp | what to do if the guards don't match |
| -> q DExp |
Desugar a Body
Arguments
| :: DsMonad q | |
| => [(Guard, Exp)] | Guarded expressions |
| -> DExp | What to do if none of the guards match |
| -> q DExp |
Desugar guarded expressions
dsDoStmts :: DsMonad q => Maybe ModName -> [Stmt] -> q DExp Source #
Desugar the Stmts in a do expression
Arguments
| :: DsMonad q | |
| => MatchContext | The context in which the clauses arise |
| -> [Clause] | Clauses to desugar |
| -> q [DClause] |
Desugar clauses to a function definition
dsVarBangType :: DsMonad q => VarBangType -> q DVarBangType Source #
Desugar a VarBangType.
dsTypeFamilyHead :: DsMonad q => TypeFamilyHead -> q DTypeFamilyHead Source #
Desugar a TypeFamilyHead
dsFamilyResultSig :: DsMonad q => FamilyResultSig -> q DFamilyResultSig Source #
Desugar a FamilyResultSig
dsPatSynDir :: DsMonad q => Name -> PatSynDir -> q DPatSynDir Source #
Desugar a PatSynDir. (Available only with GHC 8.2+)
Converting desugared AST back to TH AST
Expanding type synonyms
expandType :: DsMonad q => DType -> q DType Source #
Expands all type synonyms in a desugared type. Also expands open type family applications. (In GHCs before 7.10, this part does not work if there are any variables.) Attempts to expand closed type family applications, but aborts the moment it spots anything strange, like a nested type family application or type variable.
Reification
reifyWithWarning :: (Quasi q, MonadFail q) => Name -> q Info Source #
Reify a declaration, warning the user about splices if the reify fails. The warning says that reification can fail if you try to reify a type in the same splice as it is declared.
Local reification
template-haskell reification functions like reify and qReify, as well as
th-desugar's reifyWithWarning, only look through declarations that either
(1) have already been typechecked in the current module, or (2) are in scope
because of imports. We refer to this as global reification. Sometimes,
however, you may wish to reify declarations that have been quoted but not
yet been typechecked, such as in the following example:
example :: IO ()
example = putStrLn
$(do decs <- [d| data Foo = MkFoo |]
info <- reify (mkName "Foo")
stringE $ pprint info)
Because Foo only exists in a TH quote, it is not available globally. As a
result, the call to will fail.reify (mkName "Foo")
To make this sort of example possible, th-desugar extends global reification
with local reification. A function that performs local reification (such
as dsReify, reifyWithLocals, or similar functions that have a DsMonad
context) looks through both typechecked (or imported) declarations and quoted
declarations that are currently in scope. One can add quoted declarations in
the current scope by using the withLocalDeclarations function. Here is an
example of how to repair the example above using withLocalDeclarations:
example2 :: IO ()
example2 = putStrLn
$(do decs <- [d| data Foo = MkFoo |]
info <- withLocalDeclarations decs $
reifyWithLocals (mkName "Foo")
stringE $ pprint info)
Note that withLocalDeclarations should only be used to add quoted
declarations with names that are not duplicates of existing global or local
declarations. Adding duplicate declarations through withLocalDeclarations
is undefined behavior and should be avoided. This is unlikely to happen if
you are only using withLocalDeclarations in conjunction with TH quotes,
however. For instance, this is not an example of duplicate declarations:
data T = MkT1
$(do decs <- [d| data T = MkT2 |]
info <- withLocalDeclarations decs ...
...)
The quoted data T = MkT2 does not conflict with the top-level data T = Mk1
since declaring a data type within TH quotes gives it a fresh, unique name that
distinguishes it from any other data types already in scope.
withLocalDeclarations :: DsMonad q => [Dec] -> DsM q a -> q a Source #
Add a list of declarations to be considered when reifying local declarations.
dsReify :: DsMonad q => Name -> q (Maybe DInfo) Source #
Like reify, but safer and desugared. Uses local declarations where
available.
dsReifyType :: DsMonad q => Name -> q (Maybe DType) Source #
Like reifyType, but safer and desugared. Uses local declarations where
available.
reifyWithLocals_maybe :: DsMonad q => Name -> q (Maybe Info) Source #
Like reify from Template Haskell, but looks also in any not-yet-typechecked
declarations. To establish this list of not-yet-typechecked declarations,
use withLocalDeclarations. Returns Nothing if reification fails.
Note that no inferred type information is available from local declarations;
bottoms may be used if necessary.
reifyWithLocals :: DsMonad q => Name -> q Info Source #
Like reifyWithLocals_maybe, but throws an exception upon failure,
warning the user about separating splices.
reifyFixityWithLocals :: DsMonad q => Name -> q (Maybe Fixity) Source #
Like reifyWithLocals_maybe, but for fixities. Note that a return value
of Nothing might mean that the name is not in scope, or it might mean
that the name has no assigned fixity. (Use reifyWithLocals_maybe if
you really need to tell the difference.)
reifyTypeWithLocals_maybe :: DsMonad q => Name -> q (Maybe Type) Source #
Like reifyWithLocals_maybe but for types and kinds. Note that a return
value of Nothing might mean that the name is not in scope, or it might
mean that the full type of the name cannot be determined. (Use
reifyWithLocals_maybe if you really need to tell the difference.)
reifyTypeWithLocals :: DsMonad q => Name -> q Type Source #
Like reifyTypeWithLocals_maybe, but throws an exception upon failure,
warning the user about separating splices.
lookupValueNameWithLocals :: DsMonad q => String -> q (Maybe Name) Source #
Like lookupValueName from Template Haskell, but looks also in Names of
not-yet-typechecked declarations. To establish this list of not-yet-typechecked
declarations, use withLocalDeclarations. Returns Nothing if no value
with the same name can be found.
lookupTypeNameWithLocals :: DsMonad q => String -> q (Maybe Name) Source #
Like lookupTypeName from Template Haskell, but looks also in Names of
not-yet-typechecked declarations. To establish this list of not-yet-typechecked
declarations, use withLocalDeclarations. Returns Nothing if no type
with the same name can be found.
mkDataNameWithLocals :: DsMonad q => String -> q Name Source #
Like TH's lookupValueName, but if this name is not bound, then we assume
it is declared in the current module.
Unlike mkDataName, this also consults the local declarations in scope when
determining if the name is currently bound.
mkTypeNameWithLocals :: DsMonad q => String -> q Name Source #
Like TH's lookupTypeName, but if this name is not bound, then we assume
it is declared in the current module.
Unlike mkTypeName, this also consults the local declarations in scope when
determining if the name is currently bound.
reifyNameSpace :: DsMonad q => Name -> q (Maybe NameSpace) Source #
Determines a Name's NameSpace. If the NameSpace is attached to
the Name itself (i.e., it is unambiguous), then that NameSpace is
immediately returned. Otherwise, reification is used to lookup up the
NameSpace (consulting local declarations if necessary).
Note that if a Name lives in two different NameSpaces (which can
genuinely happen--for instance, , where mkName "=="== is both
a function and a type family), then this function will simply return
whichever NameSpace is discovered first via reification. If you wish
to find a Name in a particular NameSpace, use the
lookupValueNameWithLocals or lookupTypeNameWithLocals functions.
class (Quasi m, MonadFail m) => DsMonad (m :: Type -> Type) where Source #
A DsMonad stores some list of declarations that should be considered
in scope. DsM is the prototypical inhabitant of DsMonad.
Instances
| DsMonad IO Source # | |
Defined in Language.Haskell.TH.Desugar.Reify Methods localDeclarations :: IO [Dec] Source # | |
| DsMonad Q Source # | |
Defined in Language.Haskell.TH.Desugar.Reify Methods localDeclarations :: Q [Dec] Source # | |
| (Quasi q, MonadFail q) => DsMonad (DsM q) Source # | |
Defined in Language.Haskell.TH.Desugar.Reify Methods localDeclarations :: DsM q [Dec] Source # | |
| DsMonad m => DsMonad (ReaderT r m) Source # | |
Defined in Language.Haskell.TH.Desugar.Reify Methods localDeclarations :: ReaderT r m [Dec] Source # | |
| DsMonad m => DsMonad (StateT s m) Source # | |
Defined in Language.Haskell.TH.Desugar.Reify Methods localDeclarations :: StateT s m [Dec] Source # | |
| (DsMonad m, Monoid w) => DsMonad (WriterT w m) Source # | |
Defined in Language.Haskell.TH.Desugar.Reify Methods localDeclarations :: WriterT w m [Dec] Source # | |
| (DsMonad m, Monoid w) => DsMonad (RWST r w s m) Source # | |
Defined in Language.Haskell.TH.Desugar.Reify Methods localDeclarations :: RWST r w s m [Dec] Source # | |
data DsM (q :: Type -> Type) a Source #
A convenient implementation of the DsMonad class. Use by calling
withLocalDeclarations.
Instances
| MonadTrans DsM Source # | |
| MonadIO q => MonadIO (DsM q) Source # | |
| Applicative q => Applicative (DsM q) Source # | |
| Functor q => Functor (DsM q) Source # | |
| Monad q => Monad (DsM q) Source # | |
| MonadFail q => MonadFail (DsM q) Source # | |
| Quasi q => Quasi (DsM q) Source # | |
Defined in Language.Haskell.TH.Desugar.Reify Methods qNewName :: String -> DsM q Name Source # qReport :: Bool -> String -> DsM q () Source # qRecover :: DsM q a -> DsM q a -> DsM q a Source # qLookupName :: Bool -> String -> DsM q (Maybe Name) Source # qReify :: Name -> DsM q Info Source # qReifyFixity :: Name -> DsM q (Maybe Fixity) Source # qReifyType :: Name -> DsM q Type Source # qReifyInstances :: Name -> [Type] -> DsM q [Dec] Source # qReifyRoles :: Name -> DsM q [Role] Source # qReifyAnnotations :: Data a => AnnLookup -> DsM q [a] Source # qReifyModule :: Module -> DsM q ModuleInfo Source # qReifyConStrictness :: Name -> DsM q [DecidedStrictness] Source # qLocation :: DsM q Loc Source # qRunIO :: IO a -> DsM q a Source # qGetPackageRoot :: DsM q FilePath Source # qAddDependentFile :: FilePath -> DsM q () Source # qAddTempFile :: String -> DsM q FilePath Source # qAddTopDecls :: [Dec] -> DsM q () Source # qAddForeignFilePath :: ForeignSrcLang -> String -> DsM q () Source # qAddModFinalizer :: Q () -> DsM q () Source # qAddCorePlugin :: String -> DsM q () Source # qGetQ :: Typeable a => DsM q (Maybe a) Source # qPutQ :: Typeable a => a -> DsM q () Source # qIsExtEnabled :: Extension -> DsM q Bool Source # qExtsEnabled :: DsM q [Extension] Source # | |
| (Quasi q, MonadFail q) => DsMonad (DsM q) Source # | |
Defined in Language.Haskell.TH.Desugar.Reify Methods localDeclarations :: DsM q [Dec] Source # | |
Nested pattern flattening
scExp :: DsMonad q => DExp -> q DExp Source #
Remove all nested pattern-matches within this expression. This also
removes all DTildePas and DBangPas. After this is run, every pattern
is guaranteed to be either a DConPa with bare variables as arguments,
a DLitPa, or a DWildPa.
Capture-avoiding substitution and utilities
Free variable calculation
extractBoundNamesDPat :: DPat -> OSet Name Source #
Extract the term variables bound by a DPat.
This does not extract any type variables bound by pattern signatures, constructor patterns, or type patterns.
Utility functions
removeWilds :: DsMonad q => DPat -> q DPat Source #
Remove all wildcards from a pattern, replacing any wildcard with a fresh variable
Arguments
| :: DsMonad q | |
| => String | Print this out on failure |
| -> Name | Name of the datatype ( |
| -> q (DataFlavor, [TyVarBndrVis], [Con]) |
Extract the DataFlavor, TyVarBndrs and constructors given the Name
of a type.
dataConNameToDataName :: DsMonad q => Name -> q Name Source #
From the name of a data constructor, retrive the datatype definition it is a part of.
dataConNameToCon :: DsMonad q => Name -> q Con Source #
From the name of a data constructor, retrieve its definition as a Con
nameOccursIn :: Data a => Name -> a -> Bool Source #
Check if a name occurs anywhere within a TH tree.
allNamesIn :: Data a => a -> [Name] Source #
Extract all Names mentioned in a TH tree.
flattenDValD :: Quasi q => DLetDec -> q [DLetDec] Source #
If the declaration passed in is a DValD, creates new, equivalent
declarations such that the DPat in all DValDs is just a plain
DVarPa. Other declarations are passed through unchanged.
Note that the declarations that come out of this function are rather
less efficient than those that come in: they have many more pattern
matches.
getRecordSelectors :: DsMonad q => [DCon] -> q [DLetDec] Source #
Produces DLetDecs representing the record selector functions from
the provided DCons.
Note that if the same record selector appears in multiple constructors,
getRecordSelectors will return only one binding for that selector.
For example, if you had:
data X = X1 {y :: Symbol} | X2 {y :: Symbol}
Then calling getRecordSelectors on [X1, X2] will return:
[ DSigD y (DAppT (DAppT DArrowT (DConT X)) (DConT Symbol))
, DFunD y [ DClause [DConP X1 [DVarP field]] (DVarE field)
, DClause [DConP X2 [DVarP field]] (DVarE field) ] ]
instead of returning one binding for X1 and another binding for X2.
getRecordSelectors does not attempt to filter out "naughty" record
selectors—that is, records whose field types mention existentially
quantified type variables that do not appear in the constructor's return
type. Here is an example of a naughty record selector:
data Some :: (Type -> Type) -> Type where
MkSome :: { getSome :: f a } -> Some f
GHC itself will not allow the use of getSome as a top-level function due
to its type f a mentioning the existential variable a, but
getRecordSelectors will return it nonetheless. Ultimately, this design
choice is a practical one, as detecting which type variables are existential
in Template Haskell is difficult in the general case.
mkTypeName :: Quasi q => String -> q Name Source #
Like TH's lookupTypeName, but if this name is not bound, then we assume
it is declared in the current module.
mkDataName :: Quasi q => String -> q Name Source #
Like TH's lookupDataName, but if this name is not bound, then we assume
it is declared in the current module.
newUniqueName :: Quasi q => String -> q Name Source #
Like newName, but even more unique (unique across different splices),
and with unique nameBases. Precondition: the string is a valid Haskell
alphanumeric identifier (could be upper- or lower-case).
mkTupleDExp :: [DExp] -> DExp Source #
mkTupleDPat :: [DPat] -> DPat Source #
maybeDCaseE :: MatchContext -> DExp -> [DMatch] -> DExp Source #
If matches is non-empty, make a case statement; otherwise make an error statement
tupleNameDegree_maybe :: Name -> Maybe Int Source #
Extract the degree of a tuple Name.
In addition to recognizing tuple syntax (e.g., ''(,,)), this also
recognizes the following:
In recent versions of GHC, ''() is a synonym for ''Unit, ''(,) is a
synonym for ''Tuple2, and so on. As a result, we must check for ''Unit
and ''TupleN in tupleDegree_maybe to be thorough. (There is no special
tuple syntax for ''Solo/'MkSolo, but we check them here as well for the
sake of completeness.)
unboxedSumNameDegree_maybe :: Name -> Maybe Int Source #
Extract the degree of an unboxed sum Name.
In addition to recognizing unboxed sum syntax (e.g., ''()), this also
recognizes ''SumN# (for unboxed N-ary sum type constructors). In recent
versions of GHC, ''Sum2# is a synonym for ''(), ''Sum3# is a synonym
for ''(), and so on. As a result, we must check for ''SumN# in
unboxedSumNameDegree_maybe to be thorough.
unboxedTupleNameDegree_maybe :: Name -> Maybe Int Source #
Extract the degree of an unboxed tuple Name.
In addition to recognizing unboxed tuple syntax (e.g., ''()), this also
recognizes the following:
In recent versions of GHC, ''(##) is a synonym for ''Unit#, ''() is
a synonym for ''Tuple2#, and so on. As a result, we must check for
''Unit#, and ''TupleN in unboxedTupleNameDegree_maybe to be thorough.
(There is no special unboxed tuple type constructor for ''Solo#/'Solo#,
but we check them here as well for the sake of completeness.)
isTypeKindName :: Name -> Bool Source #
bindIP :: forall (name :: Symbol) a r. a -> (IP name a => r) -> r Source #
Get an implicit param constraint (IP name a, which is the desugared
form of (?name :: a)) from an explicit value.
This function is only available with GHC 8.0 or later.
mkExtraDKindBinders :: DsMonad q => DKind -> q [DTyVarBndrVis] Source #
Create new kind variable binder names corresponding to the return kind of a data type. This is useful when you have a data type like:
data Foo :: forall k. k -> Type -> Type where ...
But you want to be able to refer to the type Foo a b.
mkExtraDKindBinders will take the kind forall k. k -> Type -> Type,
discover that is has two visible argument kinds, and return as a result
two new kind variable binders [a :: k, b :: Type], where a and b
are fresh type variable names.
This expands kind synonyms if necessary.
dTyVarBndrToDType :: DTyVarBndr flag -> DType Source #
Convert a DTyVarBndr into a DType
changeDTVFlags :: newFlag -> [DTyVarBndr oldFlag] -> [DTyVarBndr newFlag] Source #
Set the flag in a list of DTyVarBndrs. This is often useful in contexts
where one needs to re-use a list of DTyVarBndrs from one flag setting to
another flag setting. For example, in order to re-use the DTyVarBndrs bound
by a DDataD in a DForallT, one can do the following:
case x ofDDataD_ _ _ tvbs _ _ _ ->DForallT(DForallInvis(changeDTVFlagsSpecifiedSpectvbs)) ...
toposortTyVarsOf :: [DType] -> [DTyVarBndrUnit] Source #
Take a list of DTypes, find their free variables, and sort them in
reverse topological order to ensure that they are well scoped. In other
words, the free variables are ordered such that:
- Whenever an explicit kind signature of the form
(A :: K)is encountered, the free variables ofKwill always appear to the left of the free variables ofAin the returned result. - The constraint in (1) notwithstanding, free variables will appear in left-to-right order of their original appearance.
On older GHCs, this takes measures to avoid returning explicitly bound
kind variables, which was not possible before TypeInType.
toposortKindVarsOfTvbs :: [DTyVarBndr flag] -> [DTyVarBndrUnit] Source #
Take a telescope of DTyVarBndrs, find the free variables in their kinds,
and sort them in reverse topological order to ensure that they are well
scoped. Because the argument list is assumed to be telescoping, kind
variables that are bound earlier in the list are not returned. For example,
this:
toposortKindVarsOfTvbs [a :: k, b :: Proxy a]
Will return [k], not [k, a], since a is bound earlier by a :: k.
FunArgs and VisFunArg
The list of arguments in a function Type.
Constructors
| FANil | No more arguments. |
| FAForalls ForallTelescope FunArgs | A series of |
| FACxt Cxt FunArgs | A series of constraint arguments followed by |
| FAAnon Type FunArgs | An anonymous argument followed by an arrow. For example, the |
Instances
| Data FunArgs Source # | |
Defined in Language.Haskell.TH.Desugar.Util Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FunArgs -> c FunArgs Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FunArgs Source # toConstr :: FunArgs -> Constr Source # dataTypeOf :: FunArgs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FunArgs) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FunArgs) Source # gmapT :: (forall b. Data b => b -> b) -> FunArgs -> FunArgs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FunArgs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FunArgs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> FunArgs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> FunArgs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FunArgs -> m FunArgs Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FunArgs -> m FunArgs Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FunArgs -> m FunArgs Source # | |
| Show FunArgs Source # | |
| Eq FunArgs Source # | |
data ForallTelescope Source #
The type variable binders in a forall. This is not used by the TH AST
itself, but this is used as an intermediate data type in FAForalls.
Constructors
| ForallVis [TyVarBndrUnit] | A visible |
| ForallInvis [TyVarBndrSpec] | An invisible |
Instances
| Data ForallTelescope Source # | |
Defined in Language.Haskell.TH.Desugar.Util Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForallTelescope -> c ForallTelescope Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ForallTelescope Source # toConstr :: ForallTelescope -> Constr Source # dataTypeOf :: ForallTelescope -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ForallTelescope) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ForallTelescope) Source # gmapT :: (forall b. Data b => b -> b) -> ForallTelescope -> ForallTelescope Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForallTelescope -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForallTelescope -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ForallTelescope -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ForallTelescope -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForallTelescope -> m ForallTelescope Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForallTelescope -> m ForallTelescope Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForallTelescope -> m ForallTelescope Source # | |
| Show ForallTelescope Source # | |
Defined in Language.Haskell.TH.Desugar.Util | |
| Eq ForallTelescope Source # | |
Defined in Language.Haskell.TH.Desugar.Util Methods (==) :: ForallTelescope -> ForallTelescope -> Bool Source # (/=) :: ForallTelescope -> ForallTelescope -> Bool Source # | |
A visible function argument type (i.e., one that must be supplied
explicitly in the source code). This is in contrast to invisible
arguments (e.g., the c in c => r), which are instantiated without
the need for explicit user input.
Constructors
| VisFADep TyVarBndrUnit | A visible |
| VisFAAnon Type | An anonymous argument followed by an arrow (e.g., |
Instances
| Data VisFunArg Source # | |
Defined in Language.Haskell.TH.Desugar.Util Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> VisFunArg -> c VisFunArg Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c VisFunArg Source # toConstr :: VisFunArg -> Constr Source # dataTypeOf :: VisFunArg -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c VisFunArg) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c VisFunArg) Source # gmapT :: (forall b. Data b => b -> b) -> VisFunArg -> VisFunArg Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> VisFunArg -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> VisFunArg -> r Source # gmapQ :: (forall d. Data d => d -> u) -> VisFunArg -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> VisFunArg -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> VisFunArg -> m VisFunArg Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> VisFunArg -> m VisFunArg Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> VisFunArg -> m VisFunArg Source # | |
| Show VisFunArg Source # | |
| Eq VisFunArg Source # | |
filterVisFunArgs :: FunArgs -> [VisFunArg] Source #
Filter the visible function arguments from a list of FunArgs.
ravelType :: FunArgs -> Type -> Type Source #
Reconstruct an arrow Type from its argument and result types.
DFunArgs and DVisFunArg
The list of arguments in a function DType.
Constructors
| DFANil | No more arguments. |
| DFAForalls DForallTelescope DFunArgs | A series of |
| DFACxt DCxt DFunArgs | A series of constraint arguments followed by |
| DFAAnon DType DFunArgs | An anonymous argument followed by an arrow. For example, the |
Instances
| Data DFunArgs Source # | |||||
Defined in Language.Haskell.TH.Desugar.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DFunArgs -> c DFunArgs Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DFunArgs Source # toConstr :: DFunArgs -> Constr Source # dataTypeOf :: DFunArgs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DFunArgs) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DFunArgs) Source # gmapT :: (forall b. Data b => b -> b) -> DFunArgs -> DFunArgs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DFunArgs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DFunArgs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DFunArgs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DFunArgs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DFunArgs -> m DFunArgs Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DFunArgs -> m DFunArgs Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DFunArgs -> m DFunArgs Source # | |||||
| Generic DFunArgs Source # | |||||
Defined in Language.Haskell.TH.Desugar.Core Associated Types
| |||||
| Show DFunArgs Source # | |||||
| Eq DFunArgs Source # | |||||
| type Rep DFunArgs Source # | |||||
Defined in Language.Haskell.TH.Desugar.Core type Rep DFunArgs = D1 ('MetaData "DFunArgs" "Language.Haskell.TH.Desugar.Core" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) ((C1 ('MetaCons "DFANil" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DFAForalls" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DForallTelescope) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DFunArgs))) :+: (C1 ('MetaCons "DFACxt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DCxt) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DFunArgs)) :+: C1 ('MetaCons "DFAAnon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DFunArgs)))) | |||||
data DVisFunArg Source #
A visible function argument type (i.e., one that must be supplied
explicitly in the source code). This is in contrast to invisible
arguments (e.g., the c in c => r), which are instantiated without
the need for explicit user input.
Constructors
| DVisFADep DTyVarBndrUnit | A visible |
| DVisFAAnon DType | An anonymous argument followed by an arrow (e.g., |
Instances
| Data DVisFunArg Source # | |||||
Defined in Language.Haskell.TH.Desugar.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DVisFunArg -> c DVisFunArg Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DVisFunArg Source # toConstr :: DVisFunArg -> Constr Source # dataTypeOf :: DVisFunArg -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DVisFunArg) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DVisFunArg) Source # gmapT :: (forall b. Data b => b -> b) -> DVisFunArg -> DVisFunArg Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DVisFunArg -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DVisFunArg -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DVisFunArg -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DVisFunArg -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DVisFunArg -> m DVisFunArg Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DVisFunArg -> m DVisFunArg Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DVisFunArg -> m DVisFunArg Source # | |||||
| Generic DVisFunArg Source # | |||||
Defined in Language.Haskell.TH.Desugar.Core Associated Types
| |||||
| Show DVisFunArg Source # | |||||
Defined in Language.Haskell.TH.Desugar.Core | |||||
| Eq DVisFunArg Source # | |||||
Defined in Language.Haskell.TH.Desugar.Core Methods (==) :: DVisFunArg -> DVisFunArg -> Bool Source # (/=) :: DVisFunArg -> DVisFunArg -> Bool Source # | |||||
| type Rep DVisFunArg Source # | |||||
Defined in Language.Haskell.TH.Desugar.Core type Rep DVisFunArg = D1 ('MetaData "DVisFunArg" "Language.Haskell.TH.Desugar.Core" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) (C1 ('MetaCons "DVisFADep" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DTyVarBndrUnit)) :+: C1 ('MetaCons "DVisFAAnon" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType))) | |||||
filterDVisFunArgs :: DFunArgs -> [DVisFunArg] Source #
Filter the visible function arguments from a list of DFunArgs.
ravelDType :: DFunArgs -> DType -> DType Source #
Reconstruct an arrow DType from its argument and result types.
TypeArg
An argument to a type, either a normal type (TANormal) or a visible
kind application (TyArg).
TypeArg is useful when decomposing an application of a Type to its
arguments (e.g., in unfoldType).
Instances
| Data TypeArg Source # | |
Defined in Language.Haskell.TH.Desugar.Util Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TypeArg -> c TypeArg Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TypeArg Source # toConstr :: TypeArg -> Constr Source # dataTypeOf :: TypeArg -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TypeArg) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TypeArg) Source # gmapT :: (forall b. Data b => b -> b) -> TypeArg -> TypeArg Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TypeArg -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TypeArg -> r Source # gmapQ :: (forall d. Data d => d -> u) -> TypeArg -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> TypeArg -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TypeArg -> m TypeArg Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TypeArg -> m TypeArg Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TypeArg -> m TypeArg Source # | |
| Show TypeArg Source # | |
| Eq TypeArg Source # | |
| Desugar TypeArg DTypeArg Source # | |
filterTANormals :: [TypeArg] -> [Type] Source #
Filter the normal type arguments from a list of TypeArgs.
tyVarBndrVisToTypeArg :: TyVarBndrVis -> TypeArg Source #
Convert a TyVarBndrVis to a TypeArg. That is, convert a binder with a
BndrReq visibility to a TANormal and a binder with BndrInvis
visibility to a TyArg.
If given a KindedTV, the resulting TypeArg will omit the kind signature.
Use tyVarBndrVisToTypeArgWithSig if you want to preserve the kind
signature.
tyVarBndrVisToTypeArgWithSig :: TyVarBndrVis -> TypeArg Source #
Convert a TyVarBndrVis to a TypeArg. That is, convert a binder with a
BndrReq visibility to a TANormal and a binder with BndrInvis
visibility to a TyArg.
If given a KindedTV, the resulting TypeArg will preserve the kind
signature. Use tyVarBndrVisToTypeArg if you want to omit the kind
signature.
unfoldType :: Type -> (Type, [TypeArg]) Source #
Decompose an applied type into its individual components. For example, this:
Proxy @Type Char
would be unfolded to this:
(ConT''Proxy, [TyArg(ConT''Type),TANormal(ConT''Char)])
This process forgets about infix application, so both of these types:
Int :++: Int (:++:) Int Int
will be unfolded to this:
(ConT''(:+:), [TANormal(ConT''Int),TANormal(ConT''Int)])
This function should only be used after all UInfixT and PromotedUInfixT
types have been resolved (e.g., via th-abstraction's
resolveInfixT
function).
DTypeArg
An argument to a type, either a normal type (DTANormal) or a visible
kind application (DTyArg).
DTypeArg does not appear directly in the th-desugar AST, but it is
useful when decomposing an application of a DType to its arguments.
Instances
| Data DTypeArg Source # | |||||
Defined in Language.Haskell.TH.Desugar.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DTypeArg -> c DTypeArg Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DTypeArg Source # toConstr :: DTypeArg -> Constr Source # dataTypeOf :: DTypeArg -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DTypeArg) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DTypeArg) Source # gmapT :: (forall b. Data b => b -> b) -> DTypeArg -> DTypeArg Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DTypeArg -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DTypeArg -> r Source # gmapQ :: (forall d. Data d => d -> u) -> DTypeArg -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> DTypeArg -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DTypeArg -> m DTypeArg Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DTypeArg -> m DTypeArg Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DTypeArg -> m DTypeArg Source # | |||||
| Generic DTypeArg Source # | |||||
Defined in Language.Haskell.TH.Desugar.Core Associated Types
| |||||
| Show DTypeArg Source # | |||||
| Eq DTypeArg Source # | |||||
| Desugar TypeArg DTypeArg Source # | |||||
| type Rep DTypeArg Source # | |||||
Defined in Language.Haskell.TH.Desugar.Core type Rep DTypeArg = D1 ('MetaData "DTypeArg" "Language.Haskell.TH.Desugar.Core" "th-desugar-1.17-LjmgTB0R5ZN6DcpXjEdY8c" 'False) (C1 ('MetaCons "DTANormal" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType)) :+: C1 ('MetaCons "DTyArg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DKind))) | |||||
filterDTANormals :: [DTypeArg] -> [DType] Source #
Filter the normal type arguments from a list of DTypeArgs.
dTyVarBndrVisToDTypeArg :: DTyVarBndrVis -> DTypeArg Source #
Convert a DTyVarBndrVis to a DTypeArg. That is, convert a binder with a
BndrReq visibility to a DTANormal and a binder with BndrInvis
visibility to a DTyArg.
If given a DKindedTV, the resulting DTypeArg will omit the kind
signature. Use dTyVarBndrVisToDTypeArgWithSig if you want to preserve the
kind signature.
dTyVarBndrVisToDTypeArgWithSig :: DTyVarBndrVis -> DTypeArg Source #
Convert a DTyVarBndrVis to a DTypeArg. That is, convert a binder with a
BndrReq visibility to a DTANormal and a binder with BndrInvis
visibility to a DTyArg.
If given a DKindedTV, the resulting DTypeArg will preserve the kind
signature. Use dTyVarBndrVisToDTypeArg if you want to omit the kind
signature.
Extracting bound names
extractBoundNamesStmt :: Stmt -> OSet Name Source #
Extract the names bound in a Stmt.
This does not extract any type variables bound by pattern signatures, constructor patterns, or type patterns.