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 DPat
- data DType
- type DKind = DType
- type DCxt = [DPred]
- type DPred = DType
- data DTyVarBndr
- data DMatch = DMatch DPat DExp
- data DClause = DClause [DPat] DExp
- data DDec
- = DLetDec DLetDec
- | DDataD NewOrData DCxt Name [DTyVarBndr] (Maybe DKind) [DCon] [DDerivClause]
- | DTySynD Name [DTyVarBndr] DType
- | DClassD DCxt Name [DTyVarBndr] [FunDep] [DDec]
- | DInstanceD (Maybe Overlap) (Maybe [DTyVarBndr]) DCxt DType [DDec]
- | DForeignD DForeign
- | DOpenTypeFamilyD DTypeFamilyHead
- | DClosedTypeFamilyD DTypeFamilyHead [DTySynEqn]
- | DDataFamilyD Name [DTyVarBndr] (Maybe DKind)
- | DDataInstD NewOrData DCxt (Maybe [DTyVarBndr]) DType (Maybe DKind) [DCon] [DDerivClause]
- | DTySynInstD DTySynEqn
- | DRoleAnnotD Name [Role]
- | DStandaloneDerivD (Maybe DDerivStrategy) (Maybe [DTyVarBndr]) DCxt DType
- | DDefaultSigD Name DType
- | DPatSynD Name PatSynArgs DPatSynDir DPat
- | DPatSynSigD Name DPatSynType
- 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 NewOrData
- data DTypeFamilyHead = DTypeFamilyHead Name [DTyVarBndr] DFamilyResultSig (Maybe InjectivityAnn)
- data DFamilyResultSig
- data InjectivityAnn = InjectivityAnn Name [Name]
- data DCon = DCon [DTyVarBndr] 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
- = DInlineP Name Inline RuleMatch Phases
- | DSpecialiseP Name DType (Maybe Inline) Phases
- | DSpecialiseInstP DType
- | DRuleP String (Maybe [DTyVarBndr]) [DRuleBndr] DExp DExp Phases
- | DAnnP AnnTarget DExp
- | DLineP Int String
- | DCompleteP [Name] (Maybe Name)
- data DRuleBndr
- = DRuleVar Name
- | DTypedRuleVar Name DType
- data DTySynEqn = DTySynEqn (Maybe [DTyVarBndr]) DType DType
- data DInfo
- = DTyConI DDec (Maybe [DInstanceDec])
- | DVarI Name DType (Maybe Name)
- | DTyVarI Name DKind
- | DPrimTyConI Name Int Bool
- | DPatSynI Name DPatSynType
- type DInstanceDec = DDec
- data Role
- data AnnTarget
- = ModuleAnnotation
- | TypeAnnotation Name
- | ValueAnnotation Name
- 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 -> q DTyVarBndr
- dsCxt :: DsMonad q => Cxt -> q DCxt
- dsCon :: DsMonad q => [DTyVarBndr] -> 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 = WriterT [(Name, DExp)] q
- dsPred :: DsMonad q => Pred -> q DCxt
- dsPat :: DsMonad q => Pat -> PatM q DPat
- dsDec :: DsMonad q => Dec -> q [DDec]
- dsDataDec :: DsMonad q => NewOrData -> Cxt -> Name -> [TyVarBndr] -> Maybe Kind -> [Con] -> [DerivingClause] -> q [DDec]
- dsDataInstDec :: DsMonad q => NewOrData -> Cxt -> Name -> Maybe [TyVarBndr] -> [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 => [Stmt] -> q DExp
- dsComp :: DsMonad q => [Stmt] -> q DExp
- dsClauses :: DsMonad q => Name -> [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)
- reifyWithLocals_maybe :: DsMonad q => Name -> q (Maybe Info)
- reifyWithLocals :: DsMonad q => Name -> q Info
- reifyFixityWithLocals :: DsMonad q => Name -> q (Maybe Fixity)
- 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 where
- localDeclarations :: m [Dec]
- data DsM q 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 ([TyVarBndr], [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 => DType -> [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 :: String -> DExp -> [DMatch] -> DExp
- mkDLamEFromDPats :: DsMonad q => [DPat] -> DExp -> q DExp
- tupleDegree_maybe :: String -> Maybe Int
- tupleNameDegree_maybe :: Name -> Maybe Int
- unboxedSumDegree_maybe :: String -> Maybe Int
- unboxedSumNameDegree_maybe :: Name -> Maybe Int
- unboxedTupleDegree_maybe :: String -> Maybe Int
- unboxedTupleNameDegree_maybe :: Name -> Maybe Int
- strictToBang :: Bang -> Bang
- isTypeKindName :: Name -> Bool
- typeKindName :: Name
- bindIP :: forall name a r. a -> (IP name a => r) -> r
- unravel :: DType -> ([DTyVarBndr], [DPred], [DType], DType)
- conExistentialTvbs :: DsMonad q => DType -> DCon -> q [DTyVarBndr]
- mkExtraDKindBinders :: DsMonad q => DKind -> q [DTyVarBndr]
- dTyVarBndrToDType :: DTyVarBndr -> DType
- toposortTyVarsOf :: [DType] -> [DTyVarBndr]
- data TypeArg
- applyType :: Type -> [TypeArg] -> Type
- filterTANormals :: [TypeArg] -> [Type]
- unfoldType :: Type -> (Type, [TypeArg])
- data DTypeArg
- applyDType :: DType -> [DTypeArg] -> DType
- filterDTANormals :: [DTypeArg] -> [DType]
- 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
DVarE Name | |
DConE Name | |
DLitE Lit | |
DAppE DExp DExp | |
DAppTypeE DExp DType | |
DLamE [Name] DExp | |
DCaseE DExp [DMatch] | |
DLetE [DLetDec] DExp | |
DSigE DExp DType | |
DStaticE DExp |
Instances
Eq DExp Source # | |
Data DExp 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) -> DExp -> c DExp gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DExp dataTypeOf :: DExp -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DExp) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DExp) gmapT :: (forall b. Data b => b -> b) -> DExp -> DExp gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DExp -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DExp -> r gmapQ :: (forall d. Data d => d -> u) -> DExp -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DExp -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DExp -> m DExp gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DExp -> m DExp gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DExp -> m DExp | |
Show DExp Source # | |
Generic DExp Source # | |
Lift DExp Source # | |
Defined in Language.Haskell.TH.Desugar.Lift | |
Desugar Exp DExp Source # | |
type Rep DExp Source # | |
Defined in Language.Haskell.TH.Desugar.AST type Rep DExp = D1 ('MetaData "DExp" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.10-FKN5aWlm3HyHoZdu4oBLGJ" 'False) (((C1 ('MetaCons "DVarE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :+: C1 ('MetaCons "DConE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name))) :+: (C1 ('MetaCons "DLitE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Lit)) :+: (C1 ('MetaCons "DAppE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp)) :+: C1 ('MetaCons "DAppTypeE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType))))) :+: ((C1 ('MetaCons "DLamE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Name]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp)) :+: C1 ('MetaCons "DCaseE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DMatch]))) :+: (C1 ('MetaCons "DLetE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DLetDec]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp)) :+: (C1 ('MetaCons "DSigE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DType)) :+: C1 ('MetaCons "DStaticE" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DExp)))))) |
Declarations as used in a let
statement.
Constructors
DFunD Name [DClause] | |
DValD DPat DExp | |
DSigD Name DType | |
DInfixD Fixity Name | |
DPragmaD DPragma |
Instances
Eq DLetDec Source # | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DLetDec dataTypeOf :: DLetDec -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DLetDec) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DLetDec) gmapT :: (forall b. Data b => b -> b) -> DLetDec -> DLetDec gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DLetDec -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DLetDec -> r gmapQ :: (forall d. Data d => d -> u) -> DLetDec -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DLetDec -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DLetDec -> m DLetDec gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DLetDec -> m DLetDec gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DLetDec -> m DLetDec | |
Show DLetDec Source # | |
Generic DLetDec Source # | |
Lift DLetDec Source # | |
Defined in Language.Haskell.TH.Desugar.Lift | |
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.10-FKN5aWlm3HyHoZdu4oBLGJ" '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 Name)) :+: C1 ('MetaCons "DPragmaD" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DPragma))))) |
Corresponds to TH's Pat
type.
Instances
Eq DPat Source # | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DPat dataTypeOf :: DPat -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DPat) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DPat) gmapT :: (forall b. Data b => b -> b) -> DPat -> DPat gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DPat -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DPat -> r gmapQ :: (forall d. Data d => d -> u) -> DPat -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DPat -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DPat -> m DPat gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DPat -> m DPat gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DPat -> m DPat | |
Show DPat Source # | |
Generic DPat Source # | |
Lift DPat Source # | |
Defined in Language.Haskell.TH.Desugar.Lift | |
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.10-FKN5aWlm3HyHoZdu4oBLGJ" '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 [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)))) |
Corresponds to TH's Type
type, used to represent
types and kinds.
Constructors
DForallT [DTyVarBndr] DCxt DType | |
DAppT DType DType | |
DAppKindT DType DKind | |
DSigT DType DKind | |
DVarT Name | |
DConT Name | |
DArrowT | |
DLitT TyLit | |
DWildCardT |
Instances
Eq DType Source # | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DType dataTypeOf :: DType -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DType) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DType) gmapT :: (forall b. Data b => b -> b) -> DType -> DType gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DType -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DType -> r gmapQ :: (forall d. Data d => d -> u) -> DType -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DType -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DType -> m DType gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DType -> m DType gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DType -> m DType | |
Show DType Source # | |
Generic DType Source # | |
Lift DType Source # | |
Defined in Language.Haskell.TH.Desugar.Lift | |
Desugar Type DType Source # | |
Desugar Cxt DCxt 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.10-FKN5aWlm3HyHoZdu4oBLGJ" 'False) (((C1 ('MetaCons "DForallT" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DTyVarBndr]) :*: (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 DTyVarBndr Source #
Corresponds to TH's TyVarBndr
Instances
Eq DTyVarBndr Source # | |
Defined in Language.Haskell.TH.Desugar.AST | |
Data DTyVarBndr 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 -> c DTyVarBndr gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DTyVarBndr toConstr :: DTyVarBndr -> Constr dataTypeOf :: DTyVarBndr -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DTyVarBndr) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DTyVarBndr) gmapT :: (forall b. Data b => b -> b) -> DTyVarBndr -> DTyVarBndr gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DTyVarBndr -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DTyVarBndr -> r gmapQ :: (forall d. Data d => d -> u) -> DTyVarBndr -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DTyVarBndr -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DTyVarBndr -> m DTyVarBndr gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DTyVarBndr -> m DTyVarBndr gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DTyVarBndr -> m DTyVarBndr | |
Show DTyVarBndr Source # | |
Defined in Language.Haskell.TH.Desugar.AST Methods showsPrec :: Int -> DTyVarBndr -> ShowS show :: DTyVarBndr -> String showList :: [DTyVarBndr] -> ShowS | |
Generic DTyVarBndr Source # | |
Defined in Language.Haskell.TH.Desugar.AST Associated Types type Rep DTyVarBndr :: Type -> Type | |
Lift DTyVarBndr Source # | |
Defined in Language.Haskell.TH.Desugar.Lift Methods lift :: DTyVarBndr -> Q Exp # | |
Desugar TyVarBndr DTyVarBndr Source # | |
Defined in Language.Haskell.TH.Desugar Methods desugar :: DsMonad q => TyVarBndr -> q DTyVarBndr Source # sweeten :: DTyVarBndr -> TyVarBndr Source # | |
type Rep DTyVarBndr Source # | |
Defined in Language.Haskell.TH.Desugar.AST type Rep DTyVarBndr = D1 ('MetaData "DTyVarBndr" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.10-FKN5aWlm3HyHoZdu4oBLGJ" 'False) (C1 ('MetaCons "DPlainTV" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :+: C1 ('MetaCons "DKindedTV" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DKind))) |
Corresponds to TH's Match
type.
Instances
Eq DMatch Source # | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DMatch dataTypeOf :: DMatch -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DMatch) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DMatch) gmapT :: (forall b. Data b => b -> b) -> DMatch -> DMatch gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DMatch -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DMatch -> r gmapQ :: (forall d. Data d => d -> u) -> DMatch -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DMatch -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DMatch -> m DMatch gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DMatch -> m DMatch gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DMatch -> m DMatch | |
Show DMatch Source # | |
Generic DMatch Source # | |
Lift DMatch Source # | |
Defined in Language.Haskell.TH.Desugar.Lift | |
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.10-FKN5aWlm3HyHoZdu4oBLGJ" '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
Eq DClause Source # | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DClause dataTypeOf :: DClause -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DClause) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DClause) gmapT :: (forall b. Data b => b -> b) -> DClause -> DClause gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DClause -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DClause -> r gmapQ :: (forall d. Data d => d -> u) -> DClause -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DClause -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DClause -> m DClause gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DClause -> m DClause gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DClause -> m DClause | |
Show DClause Source # | |
Generic DClause Source # | |
Lift DClause Source # | |
Defined in Language.Haskell.TH.Desugar.Lift | |
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.10-FKN5aWlm3HyHoZdu4oBLGJ" '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 NewOrData DCxt Name [DTyVarBndr] (Maybe DKind) [DCon] [DDerivClause] | |
DTySynD Name [DTyVarBndr] DType | |
DClassD DCxt Name [DTyVarBndr] [FunDep] [DDec] | |
DInstanceD (Maybe Overlap) (Maybe [DTyVarBndr]) DCxt DType [DDec] | |
DForeignD DForeign | |
DOpenTypeFamilyD DTypeFamilyHead | |
DClosedTypeFamilyD DTypeFamilyHead [DTySynEqn] | |
DDataFamilyD Name [DTyVarBndr] (Maybe DKind) | |
DDataInstD NewOrData DCxt (Maybe [DTyVarBndr]) DType (Maybe DKind) [DCon] [DDerivClause] | |
DTySynInstD DTySynEqn | |
DRoleAnnotD Name [Role] | |
DStandaloneDerivD (Maybe DDerivStrategy) (Maybe [DTyVarBndr]) DCxt DType | |
DDefaultSigD Name DType | |
DPatSynD Name PatSynArgs DPatSynDir DPat | |
DPatSynSigD Name DPatSynType |
Instances
Eq DDec Source # | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DDec dataTypeOf :: DDec -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DDec) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DDec) gmapT :: (forall b. Data b => b -> b) -> DDec -> DDec gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DDec -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DDec -> r gmapQ :: (forall d. Data d => d -> u) -> DDec -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DDec -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DDec -> m DDec gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DDec -> m DDec gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DDec -> m DDec | |
Show DDec Source # | |
Generic DDec Source # | |
Lift DDec Source # | |
Defined in Language.Haskell.TH.Desugar.Lift | |
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.10-FKN5aWlm3HyHoZdu4oBLGJ" '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 NewOrData) :*: (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 [DTyVarBndr]) :*: 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 [DTyVarBndr]) :*: 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 [DTyVarBndr]) :*: (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 [DTyVarBndr]))) :*: (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 [DTyVarBndr]) :*: 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 NewOrData) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DCxt) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [DTyVarBndr])))) :*: ((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 [DTyVarBndr]))) :*: (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)))))) |
data DDerivClause Source #
Corresponds to TH's DerivClause
type.
Constructors
DDerivClause (Maybe DDerivStrategy) DCxt |
Instances
Eq DDerivClause Source # | |
Defined in Language.Haskell.TH.Desugar.AST | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DDerivClause toConstr :: DDerivClause -> Constr dataTypeOf :: DDerivClause -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DDerivClause) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DDerivClause) gmapT :: (forall b. Data b => b -> b) -> DDerivClause -> DDerivClause gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DDerivClause -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DDerivClause -> r gmapQ :: (forall d. Data d => d -> u) -> DDerivClause -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DDerivClause -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DDerivClause -> m DDerivClause gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DDerivClause -> m DDerivClause gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DDerivClause -> m DDerivClause | |
Show DDerivClause Source # | |
Defined in Language.Haskell.TH.Desugar.AST Methods showsPrec :: Int -> DDerivClause -> ShowS show :: DDerivClause -> String showList :: [DDerivClause] -> ShowS | |
Generic DDerivClause Source # | |
Defined in Language.Haskell.TH.Desugar.AST Associated Types type Rep DDerivClause :: Type -> Type | |
Lift DDerivClause Source # | |
Defined in Language.Haskell.TH.Desugar.Lift Methods lift :: DDerivClause -> Q Exp # | |
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.10-FKN5aWlm3HyHoZdu4oBLGJ" '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
Eq DDerivStrategy Source # | |
Defined in Language.Haskell.TH.Desugar.AST Methods (==) :: DDerivStrategy -> DDerivStrategy -> Bool (/=) :: DDerivStrategy -> DDerivStrategy -> Bool | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DDerivStrategy toConstr :: DDerivStrategy -> Constr dataTypeOf :: DDerivStrategy -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DDerivStrategy) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DDerivStrategy) gmapT :: (forall b. Data b => b -> b) -> DDerivStrategy -> DDerivStrategy gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DDerivStrategy -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DDerivStrategy -> r gmapQ :: (forall d. Data d => d -> u) -> DDerivStrategy -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DDerivStrategy -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DDerivStrategy -> m DDerivStrategy gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DDerivStrategy -> m DDerivStrategy gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DDerivStrategy -> m DDerivStrategy | |
Show DDerivStrategy Source # | |
Defined in Language.Haskell.TH.Desugar.AST Methods showsPrec :: Int -> DDerivStrategy -> ShowS show :: DDerivStrategy -> String showList :: [DDerivStrategy] -> ShowS | |
Generic DDerivStrategy Source # | |
Defined in Language.Haskell.TH.Desugar.AST Associated Types type Rep DDerivStrategy :: Type -> Type | |
Lift DDerivStrategy Source # | |
Defined in Language.Haskell.TH.Desugar.Lift Methods lift :: DDerivStrategy -> Q Exp # | |
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.10-FKN5aWlm3HyHoZdu4oBLGJ" '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
Eq DPatSynDir Source # | |
Defined in Language.Haskell.TH.Desugar.AST | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DPatSynDir toConstr :: DPatSynDir -> Constr dataTypeOf :: DPatSynDir -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DPatSynDir) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DPatSynDir) gmapT :: (forall b. Data b => b -> b) -> DPatSynDir -> DPatSynDir gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DPatSynDir -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DPatSynDir -> r gmapQ :: (forall d. Data d => d -> u) -> DPatSynDir -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DPatSynDir -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DPatSynDir -> m DPatSynDir gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DPatSynDir -> m DPatSynDir gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DPatSynDir -> m DPatSynDir | |
Show DPatSynDir Source # | |
Defined in Language.Haskell.TH.Desugar.AST Methods showsPrec :: Int -> DPatSynDir -> ShowS show :: DPatSynDir -> String showList :: [DPatSynDir] -> ShowS | |
Generic DPatSynDir Source # | |
Defined in Language.Haskell.TH.Desugar.AST Associated Types type Rep DPatSynDir :: Type -> Type | |
Lift DPatSynDir Source # | |
Defined in Language.Haskell.TH.Desugar.Lift Methods lift :: DPatSynDir -> Q Exp # | |
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.10-FKN5aWlm3HyHoZdu4oBLGJ" '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
Constructors
Overlappable | |
Overlapping | |
Overlaps | |
Incoherent |
Instances
Eq Overlap | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Overlap dataTypeOf :: Overlap -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Overlap) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Overlap) gmapT :: (forall b. Data b => b -> b) -> Overlap -> Overlap gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Overlap -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Overlap -> r gmapQ :: (forall d. Data d => d -> u) -> Overlap -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> Overlap -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> Overlap -> m Overlap gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Overlap -> m Overlap gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Overlap -> m Overlap | |
Ord Overlap | |
Show Overlap | |
Generic 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 #
Constructors
PrefixPatSyn [Name] | |
InfixPatSyn Name Name | |
RecordPatSyn [Name] |
Instances
Eq PatSynArgs | |
Defined in Language.Haskell.TH.Syntax | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PatSynArgs toConstr :: PatSynArgs -> Constr dataTypeOf :: PatSynArgs -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PatSynArgs) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PatSynArgs) gmapT :: (forall b. Data b => b -> b) -> PatSynArgs -> PatSynArgs gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PatSynArgs -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PatSynArgs -> r gmapQ :: (forall d. Data d => d -> u) -> PatSynArgs -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> PatSynArgs -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> PatSynArgs -> m PatSynArgs gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PatSynArgs -> m PatSynArgs gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PatSynArgs -> m PatSynArgs | |
Ord PatSynArgs | |
Defined in Language.Haskell.TH.Syntax Methods compare :: PatSynArgs -> PatSynArgs -> Ordering (<) :: PatSynArgs -> PatSynArgs -> Bool (<=) :: PatSynArgs -> PatSynArgs -> Bool (>) :: PatSynArgs -> PatSynArgs -> Bool (>=) :: PatSynArgs -> PatSynArgs -> Bool max :: PatSynArgs -> PatSynArgs -> PatSynArgs min :: PatSynArgs -> PatSynArgs -> PatSynArgs | |
Show PatSynArgs | |
Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> PatSynArgs -> ShowS show :: PatSynArgs -> String showList :: [PatSynArgs] -> ShowS | |
Generic PatSynArgs | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep PatSynArgs :: Type -> Type | |
Ppr PatSynArgs | |
Defined in Language.Haskell.TH.Ppr | |
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])))) |
Is it a newtype
or a data
type?
Instances
Eq NewOrData Source # | |
Data NewOrData 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) -> NewOrData -> c NewOrData gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NewOrData toConstr :: NewOrData -> Constr dataTypeOf :: NewOrData -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NewOrData) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NewOrData) gmapT :: (forall b. Data b => b -> b) -> NewOrData -> NewOrData gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NewOrData -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NewOrData -> r gmapQ :: (forall d. Data d => d -> u) -> NewOrData -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> NewOrData -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> NewOrData -> m NewOrData gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NewOrData -> m NewOrData gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NewOrData -> m NewOrData | |
Show NewOrData Source # | |
Generic NewOrData Source # | |
Lift NewOrData Source # | |
Defined in Language.Haskell.TH.Desugar.Lift | |
type Rep NewOrData Source # | |
Defined in Language.Haskell.TH.Desugar.AST type Rep NewOrData = D1 ('MetaData "NewOrData" "Language.Haskell.TH.Desugar.AST" "th-desugar-1.10-FKN5aWlm3HyHoZdu4oBLGJ" 'False) (C1 ('MetaCons "Newtype" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Data" 'PrefixI 'False) (U1 :: Type -> Type)) |
data DTypeFamilyHead Source #
Corresponds to TH's TypeFamilyHead
type
Constructors
DTypeFamilyHead Name [DTyVarBndr] DFamilyResultSig (Maybe InjectivityAnn) |
Instances
Eq DTypeFamilyHead Source # | |
Defined in Language.Haskell.TH.Desugar.AST Methods (==) :: DTypeFamilyHead -> DTypeFamilyHead -> Bool (/=) :: DTypeFamilyHead -> DTypeFamilyHead -> Bool | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DTypeFamilyHead toConstr :: DTypeFamilyHead -> Constr dataTypeOf :: DTypeFamilyHead -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DTypeFamilyHead) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DTypeFamilyHead) gmapT :: (forall b. Data b => b -> b) -> DTypeFamilyHead -> DTypeFamilyHead gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DTypeFamilyHead -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DTypeFamilyHead -> r gmapQ :: (forall d. Data d => d -> u) -> DTypeFamilyHead -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DTypeFamilyHead -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DTypeFamilyHead -> m DTypeFamilyHead gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DTypeFamilyHead -> m DTypeFamilyHead gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DTypeFamilyHead -> m DTypeFamilyHead | |
Show DTypeFamilyHead Source # | |
Defined in Language.Haskell.TH.Desugar.AST Methods showsPrec :: Int -> DTypeFamilyHead -> ShowS show :: DTypeFamilyHead -> String showList :: [DTypeFamilyHead] -> ShowS | |
Generic DTypeFamilyHead Source # | |
Defined in Language.Haskell.TH.Desugar.AST Associated Types type Rep DTypeFamilyHead :: Type -> Type Methods from :: DTypeFamilyHead -> Rep DTypeFamilyHead x to :: Rep DTypeFamilyHead x -> DTypeFamilyHead | |
Lift DTypeFamilyHead Source # | |
Defined in Language.Haskell.TH.Desugar.Lift Methods lift :: DTypeFamilyHead -> Q Exp # | |
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.10-FKN5aWlm3HyHoZdu4oBLGJ" '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 [DTyVarBndr])) :*: (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 DTyVarBndr |
Instances
Eq DFamilyResultSig Source # | |
Defined in Language.Haskell.TH.Desugar.AST Methods (==) :: DFamilyResultSig -> DFamilyResultSig -> Bool (/=) :: DFamilyResultSig -> DFamilyResultSig -> Bool | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DFamilyResultSig toConstr :: DFamilyResultSig -> Constr dataTypeOf :: DFamilyResultSig -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DFamilyResultSig) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DFamilyResultSig) gmapT :: (forall b. Data b => b -> b) -> DFamilyResultSig -> DFamilyResultSig gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DFamilyResultSig -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DFamilyResultSig -> r gmapQ :: (forall d. Data d => d -> u) -> DFamilyResultSig -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DFamilyResultSig -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DFamilyResultSig -> m DFamilyResultSig gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DFamilyResultSig -> m DFamilyResultSig gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DFamilyResultSig -> m DFamilyResultSig | |
Show DFamilyResultSig Source # | |
Defined in Language.Haskell.TH.Desugar.AST Methods showsPrec :: Int -> DFamilyResultSig -> ShowS show :: DFamilyResultSig -> String showList :: [DFamilyResultSig] -> ShowS | |
Generic DFamilyResultSig Source # | |
Defined in Language.Haskell.TH.Desugar.AST Associated Types type Rep DFamilyResultSig :: Type -> Type Methods from :: DFamilyResultSig -> Rep DFamilyResultSig x to :: Rep DFamilyResultSig x -> DFamilyResultSig | |
Lift DFamilyResultSig Source # | |
Defined in Language.Haskell.TH.Desugar.Lift Methods lift :: DFamilyResultSig -> Q Exp # | |
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.10-FKN5aWlm3HyHoZdu4oBLGJ" '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 DTyVarBndr)))) |
data InjectivityAnn #
Constructors
InjectivityAnn Name [Name] |
Instances
Eq InjectivityAnn | |
Defined in Language.Haskell.TH.Syntax Methods (==) :: InjectivityAnn -> InjectivityAnn -> Bool (/=) :: InjectivityAnn -> InjectivityAnn -> Bool | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c InjectivityAnn toConstr :: InjectivityAnn -> Constr dataTypeOf :: InjectivityAnn -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c InjectivityAnn) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c InjectivityAnn) gmapT :: (forall b. Data b => b -> b) -> InjectivityAnn -> InjectivityAnn gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InjectivityAnn -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InjectivityAnn -> r gmapQ :: (forall d. Data d => d -> u) -> InjectivityAnn -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> InjectivityAnn -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> InjectivityAnn -> m InjectivityAnn gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InjectivityAnn -> m InjectivityAnn gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InjectivityAnn -> m InjectivityAnn | |
Ord InjectivityAnn | |
Defined in Language.Haskell.TH.Syntax Methods compare :: InjectivityAnn -> InjectivityAnn -> Ordering (<) :: InjectivityAnn -> InjectivityAnn -> Bool (<=) :: InjectivityAnn -> InjectivityAnn -> Bool (>) :: InjectivityAnn -> InjectivityAnn -> Bool (>=) :: InjectivityAnn -> InjectivityAnn -> Bool max :: InjectivityAnn -> InjectivityAnn -> InjectivityAnn min :: InjectivityAnn -> InjectivityAnn -> InjectivityAnn | |
Show InjectivityAnn | |
Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> InjectivityAnn -> ShowS show :: InjectivityAnn -> String showList :: [InjectivityAnn] -> ShowS | |
Generic InjectivityAnn | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep InjectivityAnn :: Type -> Type | |
Ppr InjectivityAnn | |
Defined in Language.Haskell.TH.Ppr | |
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 DCon
s 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
DKind
DCon
and Con
to keep in mind:
- Unlike
ForallC
, where the meaning of theTyVarBndr
s changes depending on whether it's followed byGadtC
/RecGadtC
or not, the meaning of theDTyVarBndr
s in aDCon
is 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
DCon
always has an explicit return type.
Constructors
DCon [DTyVarBndr] DCxt Name DConFields DType | The GADT result type |
Instances
Eq DCon Source # | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DCon dataTypeOf :: DCon -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DCon) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DCon) gmapT :: (forall b. Data b => b -> b) -> DCon -> DCon gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DCon -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DCon -> r gmapQ :: (forall d. Data d => d -> u) -> DCon -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DCon -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DCon -> m DCon gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DCon -> m DCon gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DCon -> m DCon | |
Show DCon Source # | |
Generic DCon Source # | |
Lift DCon Source # | |
Defined in Language.Haskell.TH.Desugar.Lift | |
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.10-FKN5aWlm3HyHoZdu4oBLGJ" 'False) (C1 ('MetaCons "DCon" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [DTyVarBndr]) :*: 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
Eq DConFields Source # | |
Defined in Language.Haskell.TH.Desugar.AST | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DConFields toConstr :: DConFields -> Constr dataTypeOf :: DConFields -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DConFields) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DConFields) gmapT :: (forall b. Data b => b -> b) -> DConFields -> DConFields gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DConFields -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DConFields -> r gmapQ :: (forall d. Data d => d -> u) -> DConFields -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DConFields -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DConFields -> m DConFields gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DConFields -> m DConFields gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DConFields -> m DConFields | |
Show DConFields Source # | |
Defined in Language.Haskell.TH.Desugar.AST Methods showsPrec :: Int -> DConFields -> ShowS show :: DConFields -> String showList :: [DConFields] -> ShowS | |
Generic DConFields Source # | |
Defined in Language.Haskell.TH.Desugar.AST Associated Types type Rep DConFields :: Type -> Type | |
Lift DConFields Source # | |
Defined in Language.Haskell.TH.Desugar.Lift Methods lift :: DConFields -> Q Exp # | |
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.10-FKN5aWlm3HyHoZdu4oBLGJ" '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:
ActuallyPrefix
does 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).
type DVarBangType = (Name, Bang, DType) Source #
Corresponds to TH's VarBangType
type.
Constructors
Bang SourceUnpackedness SourceStrictness |
Instances
Eq Bang | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Bang dataTypeOf :: Bang -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Bang) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Bang) gmapT :: (forall b. Data b => b -> b) -> Bang -> Bang gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Bang -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Bang -> r gmapQ :: (forall d. Data d => d -> u) -> Bang -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> Bang -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> Bang -> m Bang gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Bang -> m Bang gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Bang -> m Bang | |
Ord Bang | |
Show Bang | |
Generic Bang | |
Ppr Bang | |
Defined in Language.Haskell.TH.Ppr | |
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 #
Constructors
NoSourceUnpackedness | |
SourceNoUnpack | |
SourceUnpack |
Instances
Eq SourceUnpackedness | |
Defined in Language.Haskell.TH.Syntax Methods (==) :: SourceUnpackedness -> SourceUnpackedness -> Bool (/=) :: SourceUnpackedness -> SourceUnpackedness -> Bool | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourceUnpackedness toConstr :: SourceUnpackedness -> Constr dataTypeOf :: SourceUnpackedness -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourceUnpackedness) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourceUnpackedness) gmapT :: (forall b. Data b => b -> b) -> SourceUnpackedness -> SourceUnpackedness gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourceUnpackedness -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourceUnpackedness -> r gmapQ :: (forall d. Data d => d -> u) -> SourceUnpackedness -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> SourceUnpackedness -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourceUnpackedness -> m SourceUnpackedness gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceUnpackedness -> m SourceUnpackedness gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceUnpackedness -> m SourceUnpackedness | |
Ord SourceUnpackedness | |
Defined in Language.Haskell.TH.Syntax Methods compare :: SourceUnpackedness -> SourceUnpackedness -> Ordering (<) :: SourceUnpackedness -> SourceUnpackedness -> Bool (<=) :: SourceUnpackedness -> SourceUnpackedness -> Bool (>) :: SourceUnpackedness -> SourceUnpackedness -> Bool (>=) :: SourceUnpackedness -> SourceUnpackedness -> Bool max :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness min :: SourceUnpackedness -> SourceUnpackedness -> SourceUnpackedness | |
Show SourceUnpackedness | |
Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> SourceUnpackedness -> ShowS show :: SourceUnpackedness -> String showList :: [SourceUnpackedness] -> ShowS | |
Generic SourceUnpackedness | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep SourceUnpackedness :: Type -> Type Methods from :: SourceUnpackedness -> Rep SourceUnpackedness x to :: Rep SourceUnpackedness x -> SourceUnpackedness | |
Ppr SourceUnpackedness | |
Defined in Language.Haskell.TH.Ppr | |
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 #
Constructors
NoSourceStrictness | |
SourceLazy | |
SourceStrict |
Instances
Eq SourceStrictness | |
Defined in Language.Haskell.TH.Syntax Methods (==) :: SourceStrictness -> SourceStrictness -> Bool (/=) :: SourceStrictness -> SourceStrictness -> Bool | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourceStrictness toConstr :: SourceStrictness -> Constr dataTypeOf :: SourceStrictness -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourceStrictness) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourceStrictness) gmapT :: (forall b. Data b => b -> b) -> SourceStrictness -> SourceStrictness gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourceStrictness -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourceStrictness -> r gmapQ :: (forall d. Data d => d -> u) -> SourceStrictness -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> SourceStrictness -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourceStrictness -> m SourceStrictness gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceStrictness -> m SourceStrictness gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceStrictness -> m SourceStrictness | |
Ord SourceStrictness | |
Defined in Language.Haskell.TH.Syntax Methods compare :: SourceStrictness -> SourceStrictness -> Ordering (<) :: SourceStrictness -> SourceStrictness -> Bool (<=) :: SourceStrictness -> SourceStrictness -> Bool (>) :: SourceStrictness -> SourceStrictness -> Bool (>=) :: SourceStrictness -> SourceStrictness -> Bool max :: SourceStrictness -> SourceStrictness -> SourceStrictness min :: SourceStrictness -> SourceStrictness -> SourceStrictness | |
Show SourceStrictness | |
Defined in Language.Haskell.TH.Syntax Methods showsPrec :: Int -> SourceStrictness -> ShowS show :: SourceStrictness -> String showList :: [SourceStrictness] -> ShowS | |
Generic SourceStrictness | |
Defined in Language.Haskell.TH.Syntax Associated Types type Rep SourceStrictness :: Type -> Type Methods from :: SourceStrictness -> Rep SourceStrictness x to :: Rep SourceStrictness x -> SourceStrictness | |
Ppr SourceStrictness | |
Defined in Language.Haskell.TH.Ppr | |
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
Eq DForeign Source # | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DForeign toConstr :: DForeign -> Constr dataTypeOf :: DForeign -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DForeign) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DForeign) gmapT :: (forall b. Data b => b -> b) -> DForeign -> DForeign gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DForeign -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DForeign -> r gmapQ :: (forall d. Data d => d -> u) -> DForeign -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DForeign -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DForeign -> m DForeign gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DForeign -> m DForeign gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DForeign -> m DForeign | |
Show DForeign Source # | |
Generic DForeign Source # | |
Lift DForeign Source # | |
Defined in Language.Haskell.TH.Desugar.Lift | |
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.10-FKN5aWlm3HyHoZdu4oBLGJ" '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 [DTyVarBndr]) [DRuleBndr] DExp DExp Phases | |
DAnnP AnnTarget DExp | |
DLineP Int String | |
DCompleteP [Name] (Maybe Name) |
Instances
Eq DPragma Source # | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DPragma dataTypeOf :: DPragma -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DPragma) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DPragma) gmapT :: (forall b. Data b => b -> b) -> DPragma -> DPragma gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DPragma -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DPragma -> r gmapQ :: (forall d. Data d => d -> u) -> DPragma -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DPragma -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DPragma -> m DPragma gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DPragma -> m DPragma gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DPragma -> m DPragma | |
Show DPragma Source # | |
Generic DPragma Source # | |
Lift DPragma Source # | |
Defined in Language.Haskell.TH.Desugar.Lift | |
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.10-FKN5aWlm3HyHoZdu4oBLGJ" '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 [DTyVarBndr])) :*: 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)))))) |
Corresponds to TH's RuleBndr
type.
Constructors
DRuleVar Name | |
DTypedRuleVar Name DType |
Instances
Eq DRuleBndr Source # | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DRuleBndr toConstr :: DRuleBndr -> Constr dataTypeOf :: DRuleBndr -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DRuleBndr) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DRuleBndr) gmapT :: (forall b. Data b => b -> b) -> DRuleBndr -> DRuleBndr gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DRuleBndr -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DRuleBndr -> r gmapQ :: (forall d. Data d => d -> u) -> DRuleBndr -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DRuleBndr -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DRuleBndr -> m DRuleBndr gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DRuleBndr -> m DRuleBndr gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DRuleBndr -> m DRuleBndr | |
Show DRuleBndr Source # | |
Generic DRuleBndr Source # | |
Lift DRuleBndr Source # | |
Defined in Language.Haskell.TH.Desugar.Lift | |
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.10-FKN5aWlm3HyHoZdu4oBLGJ" '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 [DTyVarBndr]) DType DType |
Instances
Eq DTySynEqn Source # | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DTySynEqn toConstr :: DTySynEqn -> Constr dataTypeOf :: DTySynEqn -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DTySynEqn) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DTySynEqn) gmapT :: (forall b. Data b => b -> b) -> DTySynEqn -> DTySynEqn gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DTySynEqn -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DTySynEqn -> r gmapQ :: (forall d. Data d => d -> u) -> DTySynEqn -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DTySynEqn -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DTySynEqn -> m DTySynEqn gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DTySynEqn -> m DTySynEqn gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DTySynEqn -> m DTySynEqn | |
Show DTySynEqn Source # | |
Generic DTySynEqn Source # | |
Lift DTySynEqn Source # | |
Defined in Language.Haskell.TH.Desugar.Lift | |
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.10-FKN5aWlm3HyHoZdu4oBLGJ" 'False) (C1 ('MetaCons "DTySynEqn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [DTyVarBndr])) :*: (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
Eq DInfo Source # | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DInfo dataTypeOf :: DInfo -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DInfo) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DInfo) gmapT :: (forall b. Data b => b -> b) -> DInfo -> DInfo gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DInfo -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DInfo -> r gmapQ :: (forall d. Data d => d -> u) -> DInfo -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DInfo -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DInfo -> m DInfo gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DInfo -> m DInfo gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DInfo -> m DInfo | |
Show DInfo Source # | |
Generic 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.10-FKN5aWlm3HyHoZdu4oBLGJ" '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 |
Constructors
NominalR | |
RepresentationalR | |
PhantomR | |
InferR |
Instances
Eq Role | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Role dataTypeOf :: Role -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Role) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role) gmapT :: (forall b. Data b => b -> b) -> Role -> Role gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r gmapQ :: (forall d. Data d => d -> u) -> Role -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> Role -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> Role -> m Role gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role | |
Ord Role | |
Show Role | |
Generic Role | |
Ppr Role | |
Defined in Language.Haskell.TH.Ppr | |
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
Eq AnnTarget | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AnnTarget toConstr :: AnnTarget -> Constr dataTypeOf :: AnnTarget -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AnnTarget) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AnnTarget) gmapT :: (forall b. Data b => b -> b) -> AnnTarget -> AnnTarget gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AnnTarget -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AnnTarget -> r gmapQ :: (forall d. Data d => d -> u) -> AnnTarget -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> AnnTarget -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> AnnTarget -> m AnnTarget gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnTarget -> m AnnTarget gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AnnTarget -> m AnnTarget | |
Ord AnnTarget | |
Defined in Language.Haskell.TH.Syntax | |
Show AnnTarget | |
Generic 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 Type
and Kind
are type synonyms, but they desugar
to different types.
Instances
Desugar Exp DExp Source # | |
Desugar Type DType Source # | |
Desugar TyVarBndr DTyVarBndr Source # | |
Defined in Language.Haskell.TH.Desugar Methods desugar :: DsMonad q => TyVarBndr -> q DTyVarBndr Source # sweeten :: DTyVarBndr -> TyVarBndr Source # | |
Desugar Cxt DCxt Source # | |
Desugar TypeArg DTypeArg Source # | |
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 Dec
s 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 -> q DTyVarBndr Source #
Desugar a TyVarBndr
Arguments
:: DsMonad q | |
=> [DTyVarBndr] | 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 Con
s 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.)
dsRuleBndr :: DsMonad q => RuleBndr -> q DRuleBndr Source #
Desugar a RuleBndr
.
Secondary desugaring functions
type PatM q = 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 DDec
s
dsDataDec :: DsMonad q => NewOrData -> Cxt -> Name -> [TyVarBndr] -> Maybe Kind -> [Con] -> [DerivingClause] -> q [DDec] Source #
Desugar a DataD
or NewtypeD
.
dsDataInstDec :: DsMonad q => NewOrData -> Cxt -> Name -> Maybe [TyVarBndr] -> [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
DLetDec
s (a singleDec
can produce multipleDLetDec
s 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
->DExp
DLetDec
s. This function prepends binding forms for any implicit params that were bound in the argumentDec
. (If no implicit params are bound, this is simply theid
function.)
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")DLetDec
s 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
Desugar clauses to a function definition
dsBangType :: DsMonad q => BangType -> q DBangType Source #
Desugar a BangType
(or a StrictType
, if you're old-fashioned)
dsVarBangType :: DsMonad q => VarBangType -> q DVarBangType Source #
Desugar a VarBangType
(or a VarStrictType
, if you're old-fashioned)
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.
The following definitions allow you to register a list of
Dec
s to be used in reification queries.
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.
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 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.)
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 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 # |
A convenient implementation of the DsMonad
class. Use by calling
withLocalDeclarations
.
Instances
MonadTrans DsM Source # | |
Defined in Language.Haskell.TH.Desugar.Reify | |
Monad q => Monad (DsM q) Source # | |
Functor q => Functor (DsM q) Source # | |
MonadFail q => MonadFail (DsM q) Source # | |
Defined in Language.Haskell.TH.Desugar.Reify | |
Applicative q => Applicative (DsM q) Source # | |
Quasi q => Quasi (DsM q) Source # | |
Defined in Language.Haskell.TH.Desugar.Reify Methods qNewName :: String -> DsM q Name qReport :: Bool -> String -> DsM q () qRecover :: DsM q a -> DsM q a -> DsM q a qLookupName :: Bool -> String -> DsM q (Maybe Name) qReifyFixity :: Name -> DsM q (Maybe Fixity) qReifyInstances :: Name -> [Type] -> DsM q [Dec] qReifyRoles :: Name -> DsM q [Role] qReifyAnnotations :: Data a => AnnLookup -> DsM q [a] qReifyModule :: Module -> DsM q ModuleInfo qReifyConStrictness :: Name -> DsM q [DecidedStrictness] qAddDependentFile :: FilePath -> DsM q () qAddTempFile :: String -> DsM q FilePath qAddTopDecls :: [Dec] -> DsM q () qAddForeignFilePath :: ForeignSrcLang -> String -> DsM q () qAddModFinalizer :: Q () -> DsM q () qAddCorePlugin :: String -> DsM q () qGetQ :: Typeable a => DsM q (Maybe a) qPutQ :: Typeable a => a -> DsM q () qIsExtEnabled :: Extension -> DsM q Bool qExtsEnabled :: DsM q [Extension] | |
MonadIO q => MonadIO (DsM q) Source # | |
Defined in Language.Haskell.TH.Desugar.Reify | |
(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 DTildePa
s and DBangPa
s. 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.
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 ([TyVarBndr], [Con]) |
Extract the TyVarBndr
s 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 DValD
s 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.
Produces DLetDec
s representing the record selector functions from
the provided DCon
s.
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
attempts to filter out "naughty" record selectors
whose types mention existentially quantified type variables. But see the
documentation for conExistentialTvbs
for limitations to this approach.
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 nameBase
s. Precondition: the string is a valid Haskell
alphanumeric identifier (could be upper- or lower-case).
mkTupleDExp :: [DExp] -> DExp Source #
mkTupleDPat :: [DPat] -> DPat Source #
maybeDCaseE :: String -> DExp -> [DMatch] -> DExp Source #
If matches is non-empty, make a case statement; otherwise make an error statement
tupleDegree_maybe :: String -> Maybe Int Source #
Extract the degree of a tuple
tupleNameDegree_maybe :: Name -> Maybe Int Source #
Extract the degree of a tuple name
unboxedSumDegree_maybe :: String -> Maybe Int Source #
Extract the degree of an unboxed sum
unboxedSumNameDegree_maybe :: Name -> Maybe Int Source #
Extract the degree of an unboxed sum name
unboxedTupleDegree_maybe :: String -> Maybe Int Source #
Extract the degree of an unboxed tuple
unboxedTupleNameDegree_maybe :: Name -> Maybe Int Source #
Extract the degree of an unboxed tuple name
strictToBang :: Bang -> Bang Source #
Convert a Strict
to a Bang
in GHCs 7.x. This is just
the identity operation in GHC 8.x, which has no Strict
.
(This is included in GHC 8.x only for good Haddocking.)
isTypeKindName :: Name -> Bool Source #
Returns True
if the argument Name
is that of Type
(or *
or ★
, to support older GHCs).
typeKindName :: Name Source #
The Name
of:
- The kind
Type
, on GHC 8.0 or later. - The kind
*
on older GHCs.
bindIP :: forall name 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.
unravel :: DType -> ([DTyVarBndr], [DPred], [DType], DType) Source #
Decompose a function type into its type variables, its context, its argument types, and its result type.
Arguments
:: DsMonad q | |
=> DType | The type of the original data declaration |
-> DCon | |
-> q [DTyVarBndr] |
Returns all of a constructor's existentially quantified type variable binders.
Detecting the presence of existentially quantified type variables in the context of Template Haskell is quite involved. Here is an example that we will use to explain how this works:
data family Foo a b data instance Foo (Maybe a) b where MkFoo :: forall x y z. x -> y -> z -> Foo (Maybe x) [z]
In MkFoo
, x
is universally quantified, whereas y
and z
are
existentially quantified. Note that MkFoo
desugars (in Core) to
something like this:
data instance Foo (Maybe a) b where MkFoo :: forall a b y z. (b ~ [z]). a -> y -> z -> Foo (Maybe a) b
Here, we can see that a
appears in the desugared return type (it is a
simple alpha-renaming of x
), so it is universally quantified. On the other
hand, neither y
nor z
appear in the desugared return type, so they are
existentially quantified.
This analysis would not have been possible without knowing what the original
data declaration's type was (in this case, Foo (Maybe a) b
), which is why
we require it as an argument. Our algorithm for detecting existentially
quantified variables is not too different from what was described above:
we match the constructor's return type with the original data type, forming
a substitution, and check which quantified variables are not part of the
domain of the substitution.
Be warned: this may overestimate which variables are existentially quantified when kind variables are involved. For instance, consider this example:
data S k (a :: k) data T a where MkT :: forall k (a :: k). { foo :: Proxy (a :: k), bar :: S k a } -> T a
Here, the kind variable k
does not appear syntactically in the return type
T a
, so conExistentialTvbs
would mistakenly flag k
as existential.
There are various tricks we could employ to improve this, but ultimately,
making this behave correctly with respect to PolyKinds
100% of the time
would amount to performing kind inference in Template Haskell, which is
quite difficult. For the sake of simplicity, we have decided to stick with
a dumb-but-predictable syntactic check.
mkExtraDKindBinders :: DsMonad q => DKind -> q [DTyVarBndr] 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 -> DType Source #
Convert a DTyVarBndr
into a DType
toposortTyVarsOf :: [DType] -> [DTyVarBndr] Source #
Take a list of DType
s, 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 ofK
will always appear to the left of the free variables ofA
in 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
.
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
Eq TypeArg Source # | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TypeArg dataTypeOf :: TypeArg -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TypeArg) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TypeArg) gmapT :: (forall b. Data b => b -> b) -> TypeArg -> TypeArg gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TypeArg -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TypeArg -> r gmapQ :: (forall d. Data d => d -> u) -> TypeArg -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> TypeArg -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> TypeArg -> m TypeArg gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TypeArg -> m TypeArg gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TypeArg -> m TypeArg | |
Show TypeArg Source # | |
Lift TypeArg Source # | |
Defined in Language.Haskell.TH.Desugar.Lift | |
Desugar TypeArg DTypeArg Source # | |
filterTANormals :: [TypeArg] -> [Type] Source #
Filter the normal type arguments from a list of TypeArg
s.
unfoldType :: Type -> (Type, [TypeArg]) Source #
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
Eq DTypeArg Source # | |
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 gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DTypeArg toConstr :: DTypeArg -> Constr dataTypeOf :: DTypeArg -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DTypeArg) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DTypeArg) gmapT :: (forall b. Data b => b -> b) -> DTypeArg -> DTypeArg gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DTypeArg -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DTypeArg -> r gmapQ :: (forall d. Data d => d -> u) -> DTypeArg -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> DTypeArg -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> DTypeArg -> m DTypeArg gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DTypeArg -> m DTypeArg gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DTypeArg -> m DTypeArg | |
Show DTypeArg Source # | |
Generic DTypeArg Source # | |
Lift DTypeArg Source # | |
Defined in Language.Haskell.TH.Desugar.Lift | |
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.10-FKN5aWlm3HyHoZdu4oBLGJ" '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 DTypeArg
s.
Extracting bound names
extractBoundNamesStmt :: Stmt -> OSet Name Source #
Extract the names bound in a Stmt
extractBoundNamesDec :: Dec -> OSet Name Source #
Extract the names bound in a Dec
that could appear in a let
expression.
extractBoundNamesPat :: Pat -> OSet Name Source #
Extract the names bound in a Pat