Language.Haskell.TH.Lib.Internal
Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Description
Language.Haskell.TH.Lib.Internal exposes some additional functionality that is used internally in GHC's integration with Template Haskell. This is not a part of the public API, and as such, there are no API guarantees for this module from version to version.
Type synonyms
type FieldPatQ = Q FieldPat Source
type TExpQ a = Q (TExp a) Source
type TyVarBndrQ = Q TyVarBndr Source
type DerivClauseQ = Q DerivClause Source
type ClauseQ = Q Clause Source
type SourceStrictnessQ = Q SourceStrictness Source
type SourceUnpackednessQ = Q SourceUnpackedness 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 PatSynDirQ = Q PatSynDir Source
type PatSynArgsQ = Q PatSynArgs Source
type FamilyResultSigQ = Q FamilyResultSig Source
type DerivStrategyQ = Q DerivStrategy 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
charPrimL :: Char -> Lit Source
stringL :: String -> Lit Source
stringPrimL :: [Word8] -> Lit Source
bytesPrimL :: Bytes -> Lit Source
rationalL :: Rational -> Lit Source
unboxedTupP :: [PatQ] -> PatQ Source
unboxedSumP :: PatQ -> SumAlt -> SumArity -> PatQ Source
conP :: Name -> [PatQ] -> PatQ Source
infixP :: PatQ -> Name -> PatQ -> PatQ Source
uInfixP :: PatQ -> Name -> PatQ -> PatQ Source
parensP :: PatQ -> PatQ Source
asP :: Name -> PatQ -> 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
recS :: [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
Dynamically binding a variable (unhygenic)
appE :: ExpQ -> ExpQ -> ExpQ Source
appTypeE :: ExpQ -> TypeQ -> 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 :: [Maybe ExpQ] -> ExpQ Source
unboxedTupE :: [Maybe ExpQ] -> ExpQ Source
unboxedSumE :: ExpQ -> SumAlt -> SumArity -> ExpQ Source
condE :: ExpQ -> ExpQ -> ExpQ -> ExpQ Source
multiIfE :: [Q (Guard, Exp)] -> ExpQ Source
letE :: [DecQ] -> ExpQ -> ExpQ Source
caseE :: ExpQ -> [MatchQ] -> ExpQ Source
mdoE :: [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
labelE :: String -> ExpQ Source
implicitParamVarE :: String -> ExpQ Source
arithSeqE
Shortcuts
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 -> [TyVarBndrQ] -> TypeQ -> DecQ Source
dataD :: CxtQ -> Name -> [TyVarBndrQ] -> Maybe KindQ -> [ConQ] -> [DerivClauseQ] -> DecQ Source
newtypeD :: CxtQ -> Name -> [TyVarBndrQ] -> Maybe KindQ -> ConQ -> [DerivClauseQ] -> DecQ Source
classD :: CxtQ -> Name -> [TyVarBndrQ] -> [FunDep] -> [DecQ] -> DecQ Source
instanceD :: CxtQ -> TypeQ -> [DecQ] -> DecQ Source
instanceWithOverlapD :: Maybe Overlap -> CxtQ -> TypeQ -> [DecQ] -> DecQ Source
sigD :: Name -> TypeQ -> DecQ Source
kiSigD :: Name -> KindQ -> 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 -> Maybe [TyVarBndrQ] -> [RuleBndrQ] -> ExpQ -> ExpQ -> Phases -> DecQ Source
pragAnnD :: AnnTarget -> ExpQ -> DecQ Source
pragLineD :: Int -> String -> DecQ Source
pragCompleteD :: [Name] -> Maybe Name -> DecQ Source
dataInstD :: CxtQ -> Maybe [TyVarBndrQ] -> TypeQ -> Maybe KindQ -> [ConQ] -> [DerivClauseQ] -> DecQ Source
newtypeInstD :: CxtQ -> Maybe [TyVarBndrQ] -> TypeQ -> Maybe KindQ -> ConQ -> [DerivClauseQ] -> DecQ Source
tySynInstD :: TySynEqnQ -> DecQ Source
dataFamilyD :: Name -> [TyVarBndrQ] -> Maybe KindQ -> DecQ Source
openTypeFamilyD :: Name -> [TyVarBndrQ] -> FamilyResultSigQ -> Maybe InjectivityAnn -> DecQ Source
closedTypeFamilyD :: Name -> [TyVarBndrQ] -> FamilyResultSigQ -> Maybe InjectivityAnn -> [TySynEqnQ] -> DecQ Source
roleAnnotD :: Name -> [Role] -> DecQ Source
standaloneDerivD :: CxtQ -> TypeQ -> DecQ Source
standaloneDerivWithStrategyD :: Maybe DerivStrategyQ -> CxtQ -> TypeQ -> DecQ Source
defaultSigD :: Name -> TypeQ -> DecQ Source
patSynD :: Name -> PatSynArgsQ -> PatSynDirQ -> PatQ -> DecQ Source
Pattern synonym declaration
patSynSigD :: Name -> TypeQ -> DecQ Source
Pattern synonym type signature
implicitParamBindD :: String -> ExpQ -> DecQ Source
Implicit parameter binding declaration. Can only be used in let and where clauses which consist entirely of implicit bindings.
tySynEqn :: Maybe [TyVarBndrQ] -> TypeQ -> TypeQ -> TySynEqnQ Source
derivClause :: Maybe DerivStrategyQ -> [PredQ] -> DerivClauseQ Source
stockStrategy :: DerivStrategyQ Source
anyclassStrategy :: DerivStrategyQ Source
newtypeStrategy :: DerivStrategyQ Source
viaStrategy :: TypeQ -> DerivStrategyQ Source
normalC :: Name -> [BangTypeQ] -> ConQ Source
recC :: Name -> [VarBangTypeQ] -> ConQ Source
infixC :: Q (Bang, Type) -> Name -> Q (Bang, Type) -> ConQ Source
forallC :: [TyVarBndrQ] -> CxtQ -> ConQ -> ConQ Source
gadtC :: [Name] -> [StrictTypeQ] -> TypeQ -> ConQ Source
recGadtC :: [Name] -> [VarStrictTypeQ] -> TypeQ -> ConQ Source
Type
forallT :: [TyVarBndrQ] -> CxtQ -> TypeQ -> TypeQ Source
forallVisT :: [TyVarBndrQ] -> TypeQ -> TypeQ Source
infixT :: TypeQ -> Name -> TypeQ -> TypeQ Source
uInfixT :: TypeQ -> Name -> TypeQ -> TypeQ Source
parensT :: TypeQ -> TypeQ Source
appT :: TypeQ -> TypeQ -> TypeQ Source
appKindT :: TypeQ -> KindQ -> TypeQ Source
litT :: TyLitQ -> TypeQ Source
unboxedTupleT :: Int -> TypeQ Source
unboxedSumT :: SumArity -> TypeQ Source
sigT :: TypeQ -> KindQ -> TypeQ Source
implicitParamT :: String -> TypeQ -> 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
noSourceUnpackedness :: SourceUnpackednessQ Source
sourceNoUnpack :: SourceUnpackednessQ Source
sourceUnpack :: SourceUnpackednessQ Source
noSourceStrictness :: SourceStrictnessQ Source
sourceLazy :: SourceStrictnessQ Source
sourceStrict :: SourceStrictnessQ Source
Deprecated: Use bang
. See https://gitlab.haskell.org/ghc/ghc/wikis/migration/8.0. Example usage: 'bang noSourceUnpackedness sourceStrict'
Deprecated: Use bang
. See https://gitlab.haskell.org/ghc/ghc/wikis/migration/8.0. Example usage: 'bang noSourceUnpackedness noSourceStrictness'
Deprecated: Use bang
. See https://gitlab.haskell.org/ghc/ghc/wikis/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 -> TyVarBndrQ Source
kindedTV :: Name -> KindQ -> TyVarBndrQ Source
appK :: Kind -> Kind -> Kind Source
Type family result
noSig :: FamilyResultSigQ Source
kindSig :: KindQ -> FamilyResultSigQ Source
tyVarSig :: TyVarBndrQ -> FamilyResultSigQ Source
Injectivity annotation
injectivityAnn :: Name -> [Name] -> InjectivityAnn Source
Role
representationalR :: Role Source
Callconv
Safety
interruptible :: Safety Source
FunDep
funDep :: [Name] -> [Name] -> FunDep Source
RuleBndr
ruleVar :: Name -> RuleBndrQ Source
typedRuleVar :: Name -> TypeQ -> RuleBndrQ Source
AnnTarget
valueAnnotation :: Name -> AnnTarget Source
typeAnnotation :: Name -> AnnTarget Source
moduleAnnotation :: AnnTarget Source
Pattern Synonyms (sub constructs)
implBidir :: PatSynDirQ Source
explBidir :: [ClauseQ] -> PatSynDirQ Source
prefixPatSyn :: [Name] -> PatSynArgsQ Source
recordPatSyn :: [Name] -> PatSynArgsQ Source
infixPatSyn :: Name -> Name -> PatSynArgsQ 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
.
© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/8.10.2/docs/html/libraries/template-haskell-2.16.0.0/Language-Haskell-TH-Lib-Internal.html