template-haskell-2.4.0.1

Language.Haskell.TH

Synopsis

Documentation

data Q a Source

Instances

runQ :: Quasi m => Q a -> m aSource

recover :: Q a -> Q a -> Q aSource

reify :: Name -> Q InfoSource

reify looks up information about the Name

location :: Q LocSource

location gives you the Location at which this computation is spliced.

runIO :: IO a -> Q aSource

The runIO function lets you run an I/O computation in the Q monad. Take care: you are guaranteed the ordering of calls to runIO within a single Q computation, but not about the order in which splices are run.

Note: for various murky reasons, stdout and stderr handles are not necesarily flushed when the compiler finishes running, so you should flush them yourself.

data Exp Source

The CompE constructor represents a list comprehension, and takes a [Stmt]. The result expression of the comprehension is the *last* of these, and should be a NoBindS. E.g. [ f x | x <- xs ] is represented by CompE [BindS (VarP x) (VarE xs), NoBindS (AppE (VarE f) (VarE x))]

Instances

data Kind Source

Constructors

StarK 
ArrowK Kind Kind 

type Cxt = [Pred]Source

data Match Source

Constructors

Match Pat Body [Dec] 

data Body Source

Constructors

GuardedB [(Guard, Exp)] 
NormalB Exp 

data Guard Source

Constructors

NormalG Exp 
PatG [Stmt] 

data Stmt Source

Constructors

BindS Pat Exp 
LetS [Dec] 
NoBindS Exp 
ParS [[Stmt]] 

valD :: PatQ -> BodyQ -> [DecQ] -> DecQSource

dataD :: CxtQ -> Name -> [TyVarBndr] -> [ConQ] -> [Name] -> DecQSource

classD :: CxtQ -> Name -> [TyVarBndr] -> [FunDep] -> [DecQ] -> DecQSource

dataInstD :: CxtQ -> Name -> [TypeQ] -> [ConQ] -> [Name] -> DecQSource

pprint :: Ppr a => a -> StringSource