template-haskell-2.16.0.0: Support library for Template Haskell
Safe HaskellSafe
LanguageHaskell2010

Language.Haskell.TH.Lib.Internal

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.

Synopsis

Type synonyms

type PatQ = Q Pat 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 CxtQ = Q Cxt Source #

type Role = Role Source #

Lowercase pattern syntax functions

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

Stmt

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

Range

Body

Guard

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)

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

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

Single-arg lambda

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

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

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

staticE :: ExpQ -> ExpQ Source #

staticE x = [| static x |]

arithSeqE Shortcuts

Dec

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

classD :: CxtQ -> Name -> [TyVarBndrQ] -> [FunDep] -> [DecQ] -> 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.

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

Type

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.

isStrict :: Q Strict Source #

Deprecated: Use bang. See https://gitlab.haskell.org/ghc/ghc/wikis/migration/8.0. Example usage: 'bang noSourceUnpackedness sourceStrict'

notStrict :: Q Strict Source #

Deprecated: Use bang. See https://gitlab.haskell.org/ghc/ghc/wikis/migration/8.0. Example usage: 'bang noSourceUnpackedness noSourceStrictness'

unpacked :: Q Strict Source #

Deprecated: Use bang. See https://gitlab.haskell.org/ghc/ghc/wikis/migration/8.0. Example usage: 'bang sourceUnpack sourceStrict'

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

Kind

Type family result

Injectivity annotation

Role

Callconv

Safety

FunDep

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

RuleBndr

AnnTarget

Pattern Synonyms (sub constructs)

Useful helper function

thisModule :: Q Module Source #

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