th-build-0.1.0.0: More convenient construction of TH ASTs

Safe HaskellSafe-Infered

Language.Haskell.TH.Build.Extras

Synopsis

Documentation

(\->) :: (Convertible a [PatQ], Convertible a1 ExpQ) => a -> a1 -> ExpQSource

getFieldESource

Arguments

:: Convertible a Name 
=> a

Ctor name

-> Int

Ctor arity

-> Int

0-based index of field to get

-> Q Exp 

svalD :: (Convertible patQ PatQ, Convertible bodyQ BodyQ) => patQ -> bodyQ -> DecQSource

Value decl without a where-clause

smatch :: (Convertible patQ PatQ, Convertible bodyQ BodyQ) => patQ -> bodyQ -> MatchQSource

case match without a where-clause

sclause :: (Convertible patQs [PatQ], Convertible bodyQ BodyQ) => patQs -> bodyQ -> ClauseQSource

Clause without a where-clause

class Sigs a b c | c -> a b, a -> b c whereSource

Methods

signature :: a -> b -> cSource

(.::) :: (Convertible qa (Q a'), Convertible qb (Q b'), Sigs a' b' c) => qa -> qb -> Q cSource

sdataD :: (Convertible name Name, Convertible tyVarBndrs [TyVarBndr], Convertible conQs [ConQ], Convertible names [Name]) => name -> tyVarBndrs -> conQs -> names -> DecQSource

data decl with no context

snewtypeD :: (Convertible name Name, Convertible tyVarBndrs [TyVarBndr], Convertible conQ ConQ, Convertible names [Name]) => name -> tyVarBndrs -> conQ -> names -> DecQSource

newtype decl with no context