template-haskell-2.11.1.0: Support library for Template Haskell

Safe Haskell | None
Language | Haskell2010

Language.Haskell.TH.Lib

Contents

- Type synonyms
- Lowercase pattern syntax functions
- Stmt
- Range
- Body
- Guard
- Match and Clause
- Exp
  - `arithSeqE` Shortcuts
- Dec
- Type
- Type Literals
- Kind
- Type family result
- Injectivity annotation
- Role
- Callconv
- Safety
- FunDep
- FamFlavour
- RuleBndr
- AnnTarget
- Useful helper function

Description

TH.Lib contains lots of useful helper functions for generating and manipulating Template Haskell terms

Synopsis

- type InfoQ = Q Info
- type PatQ = Q Pat
- type FieldPatQ = Q FieldPat
- type ExpQ = Q Exp
- type TExpQ a = Q (TExp a)
- type DecQ = Q Dec
- type DecsQ = Q [Dec]
- type ConQ = Q Con
- type TypeQ = Q Type
- type TyLitQ = Q TyLit
- type CxtQ = Q Cxt
- type PredQ = Q Pred
- type MatchQ = Q Match
- type ClauseQ = Q Clause
- type BodyQ = Q Body
- type GuardQ = Q Guard
- type StmtQ = Q Stmt
- type RangeQ = Q Range
- type SourceStrictnessQ = Q SourceStrictness
- type SourceUnpackednessQ = Q SourceUnpackedness
- type BangQ = Q Bang
- type BangTypeQ = Q BangType
- type VarBangTypeQ = Q VarBangType
- type StrictTypeQ = Q StrictType
- type VarStrictTypeQ = Q VarStrictType
- type FieldExpQ = Q FieldExp
- type RuleBndrQ = Q RuleBndr
- type TySynEqnQ = Q TySynEqn
- type Role = Role
- type InjectivityAnn = InjectivityAnn
- intPrimL :: Integer -> Lit
- wordPrimL :: Integer -> Lit
- floatPrimL :: Rational -> Lit
- doublePrimL :: Rational -> Lit
- integerL :: Integer -> Lit
- charL :: Char -> Lit
- charPrimL :: Char -> Lit
- stringL :: String -> Lit
- stringPrimL :: [Word8] -> Lit
- rationalL :: Rational -> Lit
- litP :: Lit -> PatQ
- varP :: Name -> PatQ
- tupP :: [PatQ] -> PatQ
- unboxedTupP :: [PatQ] -> PatQ
- conP :: Name -> [PatQ] -> PatQ
- infixP :: PatQ -> Name -> PatQ -> PatQ
- uInfixP :: PatQ -> Name -> PatQ -> PatQ
- parensP :: PatQ -> PatQ
- tildeP :: PatQ -> PatQ
- bangP :: PatQ -> PatQ
- asP :: Name -> PatQ -> PatQ
- wildP :: PatQ
- recP :: Name -> [FieldPatQ] -> PatQ
- listP :: [PatQ] -> PatQ
- sigP :: PatQ -> TypeQ -> PatQ
- viewP :: ExpQ -> PatQ -> PatQ
- fieldPat :: Name -> PatQ -> FieldPatQ
- bindS :: PatQ -> ExpQ -> StmtQ
- letS :: [DecQ] -> StmtQ
- noBindS :: ExpQ -> StmtQ
- parS :: [[StmtQ]] -> StmtQ
- fromR :: ExpQ -> RangeQ
- fromThenR :: ExpQ -> ExpQ -> RangeQ
- fromToR :: ExpQ -> ExpQ -> RangeQ
- fromThenToR :: ExpQ -> ExpQ -> ExpQ -> RangeQ
- normalB :: ExpQ -> BodyQ
- guardedB :: [Q (Guard, Exp)] -> BodyQ
- normalG :: ExpQ -> GuardQ
- normalGE :: ExpQ -> ExpQ -> Q (Guard, Exp)
- patG :: [StmtQ] -> GuardQ
- patGE :: [StmtQ] -> ExpQ -> Q (Guard, Exp)
- match :: PatQ -> BodyQ -> [DecQ] -> MatchQ
- clause :: [PatQ] -> BodyQ -> [DecQ] -> ClauseQ
- dyn :: String -> ExpQ
- varE :: Name -> ExpQ
- conE :: Name -> ExpQ
- litE :: Lit -> ExpQ
- appE :: ExpQ -> ExpQ -> ExpQ
- parensE :: ExpQ -> ExpQ
- uInfixE :: ExpQ -> ExpQ -> ExpQ -> ExpQ
- infixE :: Maybe ExpQ -> ExpQ -> Maybe ExpQ -> ExpQ
- infixApp :: ExpQ -> ExpQ -> ExpQ -> ExpQ
- sectionL :: ExpQ -> ExpQ -> ExpQ
- sectionR :: ExpQ -> ExpQ -> ExpQ
- lamE :: [PatQ] -> ExpQ -> ExpQ
- lam1E :: PatQ -> ExpQ -> ExpQ
- lamCaseE :: [MatchQ] -> ExpQ
- tupE :: [ExpQ] -> ExpQ
- unboxedTupE :: [ExpQ] -> ExpQ
- condE :: ExpQ -> ExpQ -> ExpQ -> ExpQ
- multiIfE :: [Q (Guard, Exp)] -> ExpQ
- letE :: [DecQ] -> ExpQ -> ExpQ
- caseE :: ExpQ -> [MatchQ] -> ExpQ
- doE :: [StmtQ] -> ExpQ
- compE :: [StmtQ] -> ExpQ
- arithSeqE :: RangeQ -> ExpQ
- listE :: [ExpQ] -> ExpQ
- sigE :: ExpQ -> TypeQ -> ExpQ
- recConE :: Name -> [Q (Name, Exp)] -> ExpQ
- recUpdE :: ExpQ -> [Q (Name, Exp)] -> ExpQ
- stringE :: String -> ExpQ
- fieldExp :: Name -> ExpQ -> Q (Name, Exp)
- staticE :: ExpQ -> ExpQ
- unboundVarE :: Name -> ExpQ
- fromE :: ExpQ -> ExpQ
- fromThenE :: ExpQ -> ExpQ -> ExpQ
- fromToE :: ExpQ -> ExpQ -> ExpQ
- fromThenToE :: ExpQ -> ExpQ -> ExpQ -> ExpQ
- valD :: PatQ -> BodyQ -> [DecQ] -> DecQ
- funD :: Name -> [ClauseQ] -> DecQ
- tySynD :: Name -> [TyVarBndr] -> TypeQ -> DecQ
- dataD :: CxtQ -> Name -> [TyVarBndr] -> Maybe Kind -> [ConQ] -> CxtQ -> DecQ
- newtypeD :: CxtQ -> Name -> [TyVarBndr] -> Maybe Kind -> ConQ -> CxtQ -> DecQ
- classD :: CxtQ -> Name -> [TyVarBndr] -> [FunDep] -> [DecQ] -> DecQ
- instanceD :: CxtQ -> TypeQ -> [DecQ] -> DecQ
- instanceWithOverlapD :: Maybe Overlap -> CxtQ -> TypeQ -> [DecQ] -> DecQ
- sigD :: Name -> TypeQ -> DecQ
- forImpD :: Callconv -> Safety -> String -> Name -> TypeQ -> DecQ
- infixLD :: Int -> Name -> DecQ
- infixRD :: Int -> Name -> DecQ
- infixND :: Int -> Name -> DecQ
- pragInlD :: Name -> Inline -> RuleMatch -> Phases -> DecQ
- pragSpecD :: Name -> TypeQ -> Phases -> DecQ
- pragSpecInlD :: Name -> TypeQ -> Inline -> Phases -> DecQ
- pragSpecInstD :: TypeQ -> DecQ
- pragRuleD :: String -> [RuleBndrQ] -> ExpQ -> ExpQ -> Phases -> DecQ
- pragAnnD :: AnnTarget -> ExpQ -> DecQ
- pragLineD :: Int -> String -> DecQ
- dataInstD :: CxtQ -> Name -> [TypeQ] -> Maybe Kind -> [ConQ] -> CxtQ -> DecQ
- newtypeInstD :: CxtQ -> Name -> [TypeQ] -> Maybe Kind -> ConQ -> CxtQ -> DecQ
- tySynInstD :: Name -> TySynEqnQ -> DecQ
- dataFamilyD :: Name -> [TyVarBndr] -> Maybe Kind -> DecQ
- openTypeFamilyD :: Name -> [TyVarBndr] -> FamilyResultSig -> Maybe InjectivityAnn -> DecQ
- closedTypeFamilyD :: Name -> [TyVarBndr] -> FamilyResultSig -> Maybe InjectivityAnn -> [TySynEqnQ] -> DecQ
- familyNoKindD :: FamFlavour -> Name -> [TyVarBndr] -> DecQ
- familyKindD :: FamFlavour -> Name -> [TyVarBndr] -> Kind -> DecQ
- closedTypeFamilyNoKindD :: Name -> [TyVarBndr] -> [TySynEqnQ] -> DecQ
- closedTypeFamilyKindD :: Name -> [TyVarBndr] -> Kind -> [TySynEqnQ] -> DecQ
- roleAnnotD :: Name -> [Role] -> DecQ
- standaloneDerivD :: CxtQ -> TypeQ -> DecQ
- defaultSigD :: Name -> TypeQ -> DecQ
- tySynEqn :: [TypeQ] -> TypeQ -> TySynEqnQ
- cxt :: [PredQ] -> CxtQ
- normalC :: Name -> [BangTypeQ] -> ConQ
- recC :: Name -> [VarBangTypeQ] -> ConQ
- infixC :: Q (Bang, Type) -> Name -> Q (Bang, Type) -> ConQ
- forallC :: [TyVarBndr] -> CxtQ -> ConQ -> ConQ
- gadtC :: [Name] -> [StrictTypeQ] -> TypeQ -> ConQ
- recGadtC :: [Name] -> [VarStrictTypeQ] -> TypeQ -> ConQ
- forallT :: [TyVarBndr] -> CxtQ -> TypeQ -> TypeQ
- varT :: Name -> TypeQ
- conT :: Name -> TypeQ
- infixT :: TypeQ -> Name -> TypeQ -> TypeQ
- uInfixT :: TypeQ -> Name -> TypeQ -> TypeQ
- parensT :: TypeQ -> TypeQ
- appT :: TypeQ -> TypeQ -> TypeQ
- arrowT :: TypeQ
- listT :: TypeQ
- litT :: TyLitQ -> TypeQ
- tupleT :: Int -> TypeQ
- unboxedTupleT :: Int -> TypeQ
- sigT :: TypeQ -> Kind -> TypeQ
- equalityT :: TypeQ
- wildCardT :: TypeQ
- classP :: Name -> [Q Type] -> Q Pred
- equalP :: TypeQ -> TypeQ -> PredQ
- promotedT :: Name -> TypeQ
- promotedTupleT :: Int -> TypeQ
- promotedNilT :: TypeQ
- promotedConsT :: TypeQ
- noSourceUnpackedness :: SourceUnpackednessQ
- sourceNoUnpack :: SourceUnpackednessQ
- sourceUnpack :: SourceUnpackednessQ
- noSourceStrictness :: SourceStrictnessQ
- sourceLazy :: SourceStrictnessQ
- sourceStrict :: SourceStrictnessQ
- isStrict :: Q Strict
- notStrict :: Q Strict
- unpacked :: Q Strict
- bang :: SourceUnpackednessQ -> SourceStrictnessQ -> BangQ
- bangType :: BangQ -> TypeQ -> BangTypeQ
- varBangType :: Name -> BangTypeQ -> VarBangTypeQ
- strictType :: Q Strict -> TypeQ -> StrictTypeQ
- varStrictType :: Name -> StrictTypeQ -> VarStrictTypeQ
- numTyLit :: Integer -> TyLitQ
- strTyLit :: String -> TyLitQ
- plainTV :: Name -> TyVarBndr
- kindedTV :: Name -> Kind -> TyVarBndr
- varK :: Name -> Kind
- conK :: Name -> Kind
- tupleK :: Int -> Kind
- arrowK :: Kind
- listK :: Kind
- appK :: Kind -> Kind -> Kind
- starK :: Kind
- constraintK :: Kind
- noSig :: FamilyResultSig
- kindSig :: Kind -> FamilyResultSig
- tyVarSig :: TyVarBndr -> FamilyResultSig
- injectivityAnn :: Name -> [Name] -> InjectivityAnn
- nominalR :: Role
- representationalR :: Role
- phantomR :: Role
- inferR :: Role
- cCall :: Callconv
- stdCall :: Callconv
- cApi :: Callconv
- prim :: Callconv
- javaScript :: Callconv
- unsafe :: Safety
- safe :: Safety
- interruptible :: Safety
- funDep :: [Name] -> [Name] -> FunDep
- typeFam :: FamFlavour
- dataFam :: FamFlavour
- ruleVar :: Name -> RuleBndrQ
- typedRuleVar :: Name -> TypeQ -> RuleBndrQ
- valueAnnotation :: Name -> AnnTarget
- typeAnnotation :: Name -> AnnTarget
- moduleAnnotation :: AnnTarget
- appsE :: [ExpQ] -> ExpQ
- thisModule :: Q Module

# Type synonyms

type InfoQ = Q Info Source #

type PatQ = Q Pat Source #

type FieldPatQ = Q FieldPat Source #

type ExpQ = Q Exp Source #

type TExpQ a = Q (TExp a) Source #

type DecQ = Q Dec Source #

type DecsQ = Q [Dec] Source #

type ConQ = Q Con Source #

type TypeQ = Q Type Source #

type TyLitQ = Q TyLit Source #

type CxtQ = Q Cxt Source #

type PredQ = Q Pred Source #

type MatchQ = Q Match Source #

type ClauseQ = Q Clause Source #

type BodyQ = Q Body Source #

type GuardQ = Q Guard Source #

type StmtQ = Q Stmt Source #

type RangeQ = Q Range Source #

type SourceStrictnessQ = Q SourceStrictness Source #

type SourceUnpackednessQ = Q SourceUnpackedness Source #

type BangQ = Q Bang Source #

type BangTypeQ = Q BangType Source #

type VarBangTypeQ = Q VarBangType Source #

type StrictTypeQ = Q StrictType Source #

type VarStrictTypeQ = Q VarStrictType Source #

type FieldExpQ = Q FieldExp Source #

type RuleBndrQ = Q RuleBndr Source #

type TySynEqnQ = Q TySynEqn Source #

type Role = Role Source #

type InjectivityAnn = InjectivityAnn Source #

# Lowercase pattern syntax functions

intPrimL :: Integer -> Lit Source #

wordPrimL :: Integer -> Lit Source #

floatPrimL :: Rational -> Lit Source #

doublePrimL :: Rational -> Lit Source #

integerL :: Integer -> Lit Source #

charL :: Char -> Lit Source #

charPrimL :: Char -> Lit Source #

stringL :: String -> Lit Source #

stringPrimL :: [Word8] -> Lit Source #

rationalL :: Rational -> Lit Source #

litP :: Lit -> PatQ Source #

varP :: Name -> PatQ Source #

tupP :: [PatQ] -> PatQ Source #

unboxedTupP :: [PatQ] -> PatQ Source #

conP :: Name -> [PatQ] -> PatQ Source #

infixP :: PatQ -> Name -> PatQ -> PatQ Source #

uInfixP :: PatQ -> Name -> PatQ -> PatQ Source #

parensP :: PatQ -> PatQ Source #

tildeP :: PatQ -> PatQ Source #

bangP :: PatQ -> PatQ Source #

asP :: Name -> PatQ -> PatQ Source #

wildP :: PatQ Source #

recP :: Name -> [FieldPatQ] -> PatQ Source #

listP :: [PatQ] -> PatQ Source #

sigP :: PatQ -> TypeQ -> PatQ Source #

viewP :: ExpQ -> PatQ -> PatQ Source #

fieldPat :: Name -> PatQ -> FieldPatQ Source #

# Stmt

bindS :: PatQ -> ExpQ -> StmtQ Source #

letS :: [DecQ] -> StmtQ Source #

noBindS :: ExpQ -> StmtQ Source #

parS :: [[StmtQ]] -> StmtQ Source #

# Range

fromR :: ExpQ -> RangeQ Source #

fromThenR :: ExpQ -> ExpQ -> RangeQ Source #

fromToR :: ExpQ -> ExpQ -> RangeQ Source #

fromThenToR :: ExpQ -> ExpQ -> ExpQ -> RangeQ Source #

# Body

normalB :: ExpQ -> BodyQ Source #

guardedB :: [Q (Guard, Exp)] -> BodyQ Source #

# Guard

normalG :: ExpQ -> GuardQ Source #

normalGE :: ExpQ -> ExpQ -> Q (Guard, Exp) Source #

patG :: [StmtQ] -> GuardQ Source #

patGE :: [StmtQ] -> ExpQ -> Q (Guard, Exp) Source #

# Match and Clause

match :: PatQ -> BodyQ -> [DecQ] -> MatchQ Source #

Use with `caseE`

clause :: [PatQ] -> BodyQ -> [DecQ] -> ClauseQ Source #

Use with `funD`

# Exp

dyn :: String -> ExpQ Source #

Dynamically binding a variable (unhygenic)

varE :: Name -> ExpQ Source #

conE :: Name -> ExpQ Source #

litE :: Lit -> ExpQ Source #

appE :: ExpQ -> ExpQ -> ExpQ Source #

parensE :: ExpQ -> ExpQ Source #

uInfixE :: ExpQ -> ExpQ -> ExpQ -> ExpQ Source #

infixE :: Maybe ExpQ -> ExpQ -> Maybe ExpQ -> ExpQ Source #

infixApp :: ExpQ -> ExpQ -> ExpQ -> ExpQ Source #

sectionL :: ExpQ -> ExpQ -> ExpQ Source #

sectionR :: ExpQ -> ExpQ -> ExpQ Source #

lamE :: [PatQ] -> ExpQ -> ExpQ Source #

lam1E :: PatQ -> ExpQ -> ExpQ Source #

Single-arg lambda

lamCaseE :: [MatchQ] -> ExpQ Source #

tupE :: [ExpQ] -> ExpQ Source #

unboxedTupE :: [ExpQ] -> ExpQ Source #

condE :: ExpQ -> ExpQ -> ExpQ -> ExpQ Source #

multiIfE :: [Q (Guard, Exp)] -> ExpQ Source #

letE :: [DecQ] -> ExpQ -> ExpQ Source #

caseE :: ExpQ -> [MatchQ] -> ExpQ Source #

doE :: [StmtQ] -> ExpQ Source #

compE :: [StmtQ] -> ExpQ Source #

arithSeqE :: RangeQ -> ExpQ Source #

listE :: [ExpQ] -> ExpQ Source #

sigE :: ExpQ -> TypeQ -> ExpQ Source #

recConE :: Name -> [Q (Name, Exp)] -> ExpQ Source #

recUpdE :: ExpQ -> [Q (Name, Exp)] -> ExpQ Source #

stringE :: String -> ExpQ Source #

fieldExp :: Name -> ExpQ -> Q (Name, Exp) Source #

staticE :: ExpQ -> ExpQ Source #

    staticE x = [| static x |]

unboundVarE :: Name -> ExpQ Source #

## `arithSeqE` Shortcuts

fromE :: ExpQ -> ExpQ Source #

fromThenE :: ExpQ -> ExpQ -> ExpQ Source #

fromToE :: ExpQ -> ExpQ -> ExpQ Source #

fromThenToE :: ExpQ -> ExpQ -> ExpQ -> ExpQ Source #

# Dec

valD :: PatQ -> BodyQ -> [DecQ] -> DecQ Source #

funD :: Name -> [ClauseQ] -> DecQ Source #

tySynD :: Name -> [TyVarBndr] -> TypeQ -> DecQ Source #

dataD :: CxtQ -> Name -> [TyVarBndr] -> Maybe Kind -> [ConQ] -> CxtQ -> DecQ Source #

newtypeD :: CxtQ -> Name -> [TyVarBndr] -> Maybe Kind -> ConQ -> CxtQ -> DecQ Source #

classD :: CxtQ -> Name -> [TyVarBndr] -> [FunDep] -> [DecQ] -> DecQ Source #

instanceD :: CxtQ -> TypeQ -> [DecQ] -> DecQ Source #

instanceWithOverlapD :: Maybe Overlap -> CxtQ -> TypeQ -> [DecQ] -> DecQ Source #

sigD :: Name -> TypeQ -> DecQ Source #

forImpD :: Callconv -> Safety -> String -> Name -> TypeQ -> DecQ Source #

infixLD :: Int -> Name -> DecQ Source #

infixRD :: Int -> Name -> DecQ Source #

infixND :: Int -> Name -> DecQ Source #

pragInlD :: Name -> Inline -> RuleMatch -> Phases -> DecQ Source #

pragSpecD :: Name -> TypeQ -> Phases -> DecQ Source #

pragSpecInlD :: Name -> TypeQ -> Inline -> Phases -> DecQ Source #

pragSpecInstD :: TypeQ -> DecQ Source #

pragRuleD :: String -> [RuleBndrQ] -> ExpQ -> ExpQ -> Phases -> DecQ Source #

pragAnnD :: AnnTarget -> ExpQ -> DecQ Source #

pragLineD :: Int -> String -> DecQ Source #

dataInstD :: CxtQ -> Name -> [TypeQ] -> Maybe Kind -> [ConQ] -> CxtQ -> DecQ Source #

newtypeInstD :: CxtQ -> Name -> [TypeQ] -> Maybe Kind -> ConQ -> CxtQ -> DecQ Source #

tySynInstD :: Name -> TySynEqnQ -> DecQ Source #

dataFamilyD :: Name -> [TyVarBndr] -> Maybe Kind -> DecQ Source #

openTypeFamilyD :: Name -> [TyVarBndr] -> FamilyResultSig -> Maybe InjectivityAnn -> DecQ Source #

closedTypeFamilyD :: Name -> [TyVarBndr] -> FamilyResultSig -> Maybe InjectivityAnn -> [TySynEqnQ] -> DecQ Source #

familyNoKindD :: FamFlavour -> Name -> [TyVarBndr] -> DecQ Source #

Deprecated: This function will be removed in the next stable release. Use openTypeFamilyD/dataFamilyD instead.

familyKindD :: FamFlavour -> Name -> [TyVarBndr] -> Kind -> DecQ Source #

Deprecated: This function will be removed in the next stable release. Use openTypeFamilyD/dataFamilyD instead.

closedTypeFamilyNoKindD :: Name -> [TyVarBndr] -> [TySynEqnQ] -> DecQ Source #

Deprecated: This function will be removed in the next stable release. Use closedTypeFamilyD instead.

closedTypeFamilyKindD :: Name -> [TyVarBndr] -> Kind -> [TySynEqnQ] -> DecQ Source #

Deprecated: This function will be removed in the next stable release. Use closedTypeFamilyD instead.

roleAnnotD :: Name -> [Role] -> DecQ Source #

standaloneDerivD :: CxtQ -> TypeQ -> DecQ Source #

defaultSigD :: Name -> TypeQ -> DecQ Source #

tySynEqn :: [TypeQ] -> TypeQ -> TySynEqnQ Source #

cxt :: [PredQ] -> CxtQ Source #

normalC :: Name -> [BangTypeQ] -> ConQ Source #

recC :: Name -> [VarBangTypeQ] -> ConQ Source #

infixC :: Q (Bang, Type) -> Name -> Q (Bang, Type) -> ConQ Source #

forallC :: [TyVarBndr] -> CxtQ -> ConQ -> ConQ Source #

gadtC :: [Name] -> [StrictTypeQ] -> TypeQ -> ConQ Source #

recGadtC :: [Name] -> [VarStrictTypeQ] -> TypeQ -> ConQ Source #

# Type

forallT :: [TyVarBndr] -> CxtQ -> TypeQ -> TypeQ Source #

varT :: Name -> TypeQ Source #

conT :: Name -> TypeQ Source #

infixT :: TypeQ -> Name -> TypeQ -> TypeQ Source #

uInfixT :: TypeQ -> Name -> TypeQ -> TypeQ Source #

parensT :: TypeQ -> TypeQ Source #

appT :: TypeQ -> TypeQ -> TypeQ Source #

arrowT :: TypeQ Source #

listT :: TypeQ Source #

litT :: TyLitQ -> TypeQ Source #

tupleT :: Int -> TypeQ Source #

unboxedTupleT :: Int -> TypeQ Source #

sigT :: TypeQ -> Kind -> TypeQ Source #

equalityT :: TypeQ Source #

wildCardT :: TypeQ Source #

classP :: Name -> [Q Type] -> Q Pred Source #

Deprecated: As of template-haskell-2.10, constraint predicates (Pred) are just types (Type), in keeping with ConstraintKinds. Please use `conT` and `appT`.

equalP :: TypeQ -> TypeQ -> PredQ Source #

Deprecated: As of template-haskell-2.10, constraint predicates (Pred) are just types (Type), in keeping with ConstraintKinds. Please see `equalityT`.

promotedT :: Name -> TypeQ Source #

promotedTupleT :: Int -> TypeQ Source #

promotedNilT :: TypeQ Source #

promotedConsT :: TypeQ Source #

noSourceUnpackedness :: SourceUnpackednessQ Source #

sourceNoUnpack :: SourceUnpackednessQ Source #

sourceUnpack :: SourceUnpackednessQ Source #

noSourceStrictness :: SourceStrictnessQ Source #

sourceLazy :: SourceStrictnessQ Source #

sourceStrict :: SourceStrictnessQ Source #

isStrict :: Q Strict Source #

Deprecated: Use `bang`. See https://ghc.haskell.org/trac/ghc/wiki/Migration/8.0. Example usage: 'bang noSourceUnpackedness sourceStrict'

notStrict :: Q Strict Source #

Deprecated: Use `bang`. See https://ghc.haskell.org/trac/ghc/wiki/Migration/8.0. Example usage: 'bang noSourceUnpackedness noSourceStrictness'

unpacked :: Q Strict Source #

Deprecated: Use `bang`. See https://ghc.haskell.org/trac/ghc/wiki/Migration/8.0. Example usage: 'bang sourceUnpack sourceStrict'

bang :: SourceUnpackednessQ -> SourceStrictnessQ -> BangQ Source #

bangType :: BangQ -> TypeQ -> BangTypeQ Source #

varBangType :: Name -> BangTypeQ -> VarBangTypeQ Source #

strictType :: Q Strict -> TypeQ -> StrictTypeQ Source #

Deprecated: As of `template-haskell-2.11.0.0`, `StrictType` has been replaced by `BangType`. Please use `bangType` instead.

varStrictType :: Name -> StrictTypeQ -> VarStrictTypeQ Source #

Deprecated: As of `template-haskell-2.11.0.0`, `VarStrictType` has been replaced by `VarBangType`. Please use `varBangType` instead.

# Type Literals

numTyLit :: Integer -> TyLitQ Source #

strTyLit :: String -> TyLitQ Source #

# Kind

plainTV :: Name -> TyVarBndr Source #

kindedTV :: Name -> Kind -> TyVarBndr Source #

varK :: Name -> Kind Source #

conK :: Name -> Kind Source #

tupleK :: Int -> Kind Source #

arrowK :: Kind Source #

listK :: Kind Source #

appK :: Kind -> Kind -> Kind Source #

starK :: Kind Source #

constraintK :: Kind Source #

# Type family result

noSig :: FamilyResultSig Source #

kindSig :: Kind -> FamilyResultSig Source #

tyVarSig :: TyVarBndr -> FamilyResultSig Source #

# Injectivity annotation

injectivityAnn :: Name -> [Name] -> InjectivityAnn Source #

# Role

nominalR :: Role Source #

representationalR :: Role Source #

phantomR :: Role Source #

inferR :: Role Source #

# Callconv

cCall :: Callconv Source #

stdCall :: Callconv Source #

cApi :: Callconv Source #

prim :: Callconv Source #

javaScript :: Callconv Source #

# Safety

unsafe :: Safety Source #

safe :: Safety Source #

interruptible :: Safety Source #

# FunDep

funDep :: [Name] -> [Name] -> FunDep Source #

# FamFlavour

typeFam :: FamFlavour Source #

dataFam :: FamFlavour Source #

# RuleBndr

ruleVar :: Name -> RuleBndrQ Source #

typedRuleVar :: Name -> TypeQ -> RuleBndrQ Source #

# AnnTarget

valueAnnotation :: Name -> AnnTarget Source #

typeAnnotation :: Name -> AnnTarget Source #

moduleAnnotation :: AnnTarget Source #

# Useful helper function

appsE :: [ExpQ] -> ExpQ Source #

thisModule :: Q Module Source #

Return the Module at the place of splicing. Can be used as an input for `reifyModule`.