Haskell Hierarchical Libraries (haskell-src package)ContentsIndex
Language.Haskell.THSyntax
Portability portable
Stability experimental
Maintainer libraries@haskell.org
Description
Abstract syntax definitions for Template Haskell.
Synopsis
newtype Q a = Q (IO a)
unQ :: Q a -> IO a
qIO :: IO a -> Q a
runQ :: Q a -> IO a
returnQ :: a -> Q a
bindQ :: Q a -> (a -> Q b) -> Q b
sequenceQ :: [Q a] -> Q [a]
counter :: IORef Int
gensym :: String -> Q String
class Lift t where
lift :: t -> ExpQ
data Lit
= CharL Char
| StringL String
| IntegerL Integer
| RationalL Rational
| IntPrimL Integer
| FloatPrimL Rational
| DoublePrimL Rational
data Pat
= LitP Lit
| VarP String
| TupP [Pat]
| ConP String [Pat]
| TildeP Pat
| AsP String Pat
| WildP
| RecP String [FieldPat]
| ListP [Pat]
type FieldPat = (String, Pat)
data Match = Match Pat Body [Dec]
data Clause = Clause [Pat] Body [Dec]
data Exp
= VarE String
| ConE String
| LitE Lit
| AppE Exp Exp
| InfixE (Maybe Exp) Exp (Maybe Exp)
| LamE [Pat] Exp
| TupE [Exp]
| CondE Exp Exp Exp
| LetE [Dec] Exp
| CaseE Exp [Match]
| DoE [Stmt]
| CompE [Stmt]
| ArithSeqE Range
| ListE [Exp]
| SigE Exp Type
| RecConE String [FieldExp]
| RecUpdE Exp [FieldExp]
type FieldExp = (String, Exp)
data Body
= GuardedB [(Exp, Exp)]
| NormalB Exp
data Stmt
= BindS Pat Exp
| LetS [Dec]
| NoBindS Exp
| ParS [[Stmt]]
data Range
= FromR Exp
| FromThenR Exp Exp
| FromToR Exp Exp
| FromThenToR Exp Exp Exp
data Dec
= FunD String [Clause]
| ValD Pat Body [Dec]
| DataD Cxt String [String] [Con] [String]
| NewtypeD Cxt String [String] Con [String]
| TySynD String [String] Type
| ClassD Cxt String [String] [Dec]
| InstanceD Cxt Type [Dec]
| SigD String Type
| ForeignD Foreign
data Foreign
= ImportF Callconv Safety String String Type
| ExportF Callconv String String Type
data Callconv
= CCall
| StdCall
data Safety
= Unsafe
| Safe
| Threadsafe
type Cxt = [Type]
data Strict
= IsStrict
| NotStrict
data Con
= NormalC String [StrictType]
| RecC String [VarStrictType]
| InfixC StrictType String StrictType
type StrictType = (Strict, Type)
type StrictTypeQ = Q StrictType
type VarStrictType = (String, Strict, Type)
type VarStrictTypeQ = Q VarStrictType
data Module = Module [Dec]
data Type
= ForallT [String] Cxt Type
| VarT String
| ConT String
| TupleT Int
| ArrowT
| ListT
| AppT Type Type
type ExpQ = Q Exp
type DecQ = Q Dec
type ConQ = Q Con
type TypeQ = Q Type
type CxtQ = Q Cxt
type MatchQ = Q Match
type ClauseQ = Q Clause
type BodyQ = Q Body
type StmtQ = Q Stmt
type RangeQ = Q Range
intPrimL :: Integer -> Lit
floatPrimL :: Rational -> Lit
doublePrimL :: Rational -> Lit
integerL :: Integer -> Lit
charL :: Char -> Lit
stringL :: String -> Lit
rationalL :: Rational -> Lit
litP :: Lit -> Pat
varP :: String -> Pat
tupP :: [Pat] -> Pat
conP :: String -> [Pat] -> Pat
tildeP :: Pat -> Pat
asP :: String -> Pat -> Pat
wildP :: Pat
recP :: String -> [FieldPat] -> Pat
listP :: [Pat] -> Pat
fieldPat :: String -> Pat -> (String, Pat)
bindS :: Pat -> 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 :: [(ExpQ, ExpQ)] -> BodyQ
match :: Pat -> BodyQ -> [DecQ] -> MatchQ
clause :: [Pat] -> BodyQ -> [DecQ] -> ClauseQ
global :: String -> ExpQ
varE :: String -> ExpQ
conE :: String -> ExpQ
litE :: Lit -> ExpQ
appE :: ExpQ -> ExpQ -> ExpQ
infixE :: Maybe ExpQ -> ExpQ -> Maybe ExpQ -> ExpQ
infixApp :: ExpQ -> ExpQ -> ExpQ -> ExpQ
sectionL :: ExpQ -> ExpQ -> ExpQ
sectionR :: ExpQ -> ExpQ -> ExpQ
lamE :: [Pat] -> ExpQ -> ExpQ
lam1E :: Pat -> ExpQ -> ExpQ
tupE :: [ExpQ] -> ExpQ
condE :: ExpQ -> ExpQ -> ExpQ -> ExpQ
letE :: [DecQ] -> ExpQ -> ExpQ
caseE :: ExpQ -> [MatchQ] -> ExpQ
doE :: [StmtQ] -> ExpQ
compE :: [StmtQ] -> ExpQ
arithSeqE :: RangeQ -> ExpQ
fromE :: ExpQ -> ExpQ
fromThenE :: ExpQ -> ExpQ -> ExpQ
fromToE :: ExpQ -> ExpQ -> ExpQ
fromThenToE :: ExpQ -> ExpQ -> ExpQ -> ExpQ
listE :: [ExpQ] -> ExpQ
sigE :: ExpQ -> TypeQ -> ExpQ
recConE :: String -> [Q (String, Exp)] -> ExpQ
recUpdE :: ExpQ -> [Q (String, Exp)] -> ExpQ
stringE :: String -> ExpQ
fieldExp :: String -> ExpQ -> Q (String, Exp)
valD :: Pat -> BodyQ -> [DecQ] -> DecQ
funD :: String -> [ClauseQ] -> DecQ
tySynD :: String -> [String] -> TypeQ -> DecQ
dataD :: CxtQ -> String -> [String] -> [ConQ] -> [String] -> DecQ
newtypeD :: CxtQ -> String -> [String] -> ConQ -> [String] -> DecQ
classD :: CxtQ -> String -> [String] -> [DecQ] -> DecQ
instanceD :: CxtQ -> TypeQ -> [DecQ] -> DecQ
sigD :: String -> TypeQ -> DecQ
cxt :: [TypeQ] -> CxtQ
normalC :: String -> [StrictTypeQ] -> ConQ
recC :: String -> [VarStrictTypeQ] -> ConQ
infixC :: Q (Strict, Type) -> String -> Q (Strict, Type) -> ConQ
forallT :: [String] -> CxtQ -> TypeQ -> TypeQ
varT :: String -> TypeQ
conT :: String -> TypeQ
appT :: TypeQ -> TypeQ -> TypeQ
arrowT :: TypeQ
listT :: TypeQ
tupleT :: Int -> TypeQ
isStrict :: Q Strict
notStrict :: Q Strict
strictType :: Q Strict -> TypeQ -> StrictTypeQ
varStrictType :: String -> StrictTypeQ -> VarStrictTypeQ
combine :: [([(String, String)], Pat)] -> ([(String, String)], [Pat])
rename :: Pat -> Q ([(String, String)], Pat)
genpat :: Pat -> Q (String -> ExpQ, Pat)
alpha :: [(String, String)] -> String -> ExpQ
genPE :: String -> Integer -> ([Pat], [ExpQ])
appsE :: [ExpQ] -> ExpQ
simpleMatch :: Pat -> Exp -> Match
nestDepth :: Int
type Precedence = Int
appPrec :: Precedence
opPrec :: Precedence
noPrec :: Precedence
parensIf :: Bool -> Doc -> Doc
pprExp :: Exp -> Doc
pprExpI :: Precedence -> Exp -> Doc
pprFields :: [(String, Exp)] -> Doc
pprMaybeExp :: Precedence -> Maybe Exp -> Doc
pprStmt :: Stmt -> Doc
pprMatch :: Match -> Doc
pprBody :: Bool -> Body -> Doc
pprLit :: Precedence -> Lit -> Doc
pprPat :: Pat -> Doc
pprPatI :: Precedence -> Pat -> Doc
pprDec :: Dec -> Doc
pprForeign :: Foreign -> Doc
pprClause :: Clause -> Doc
pprCon :: Con -> Doc
pprVarStrictType :: (String, Strict, Type) -> Doc
pprStrictType :: (Strict, Type) -> Doc
pprParendType :: Type -> Doc
pprType :: Type -> Doc
pprTyApp :: (Type, [Type]) -> Doc
split :: Type -> (Type, [Type])
pprCxt :: Cxt -> Doc
pprRange :: Range -> Doc
pprRangeI :: Range -> Doc
where_clause :: [Dec] -> Doc
showtextl :: Show a => a -> Doc
Produced by Haddock version 0.6