template-haskell-2.2.0.0

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

currentModule :: Q StringSource

currentModule gives you the name of the module in 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.

type Cxt = [Type]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 -> [Name] -> [ConQ] -> [Name] -> DecQSource

newtypeD :: CxtQ -> Name -> [Name] -> ConQ -> [Name] -> DecQSource

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

class Ppr a whereSource

Methods

ppr :: a -> DocSource

ppr_list :: [a] -> DocSource

pprint :: Ppr a => a -> StringSource