The main feature here is implicit conversion of arguments to AST constructors: Tired of writing things like
> valD (varP (mkName "foo")) (normalB (appE (varE 'not)
> (conT 'True))) 
? With th-build:
> valD' "foo" (appE' 'not 'True) ()
Hint: Use () for an empty list argument to an autoconverting function, since  will yield an type ambiguity error.
This package provides the Language.Haskell.TH.Desugar module, which desugars Template Haskell's rich encoding of Haskell syntax into a simpler encoding. This desugaring discards surface syntax information (such as the use of infix operators) but retains the original meaning of the TH code. The intended use of this package is as a preprocessor for more advanced code manipulation tools. Note that the input to any of the ds... functions should be produced from a TH quote, using the syntax [| ... |]. If the input to these functions is a hand-coded TH syntax tree, the results may be unpredictable. In particular, it is likely that promoted datatypes will not work as expected.
Expands type synonyms in Template Haskell ASTs
A grab bag of functions for use with Template Haskell.
This is basically the place I put all my ugly CPP hacks to support the ever-changing interface of the template haskell system by providing high-level operations and making sure they work on as many versions of Template Haskell as I can.
Very rough-around-the-edges template haskell function for generating basic catamorphisms for algebraic data types.
A IsString for name, and the beginnings of Arbitrary instances ... I have a instance for Type ... almost ... missing the ForallT.
Given the name of a Haskell type, typeclass, type family, or any of the above, determines its kind.
Derive Template Haskell's Lift class for datatypes.
Orphan instances for TH datatypes. In particular, instances for Ord and Lift, as well as a few missing Show / Eq. These instances used to live in haskell-src-meta, and that's where the version number started.
Quasiquoters for printf: string, bytestring, text.
th-sccs exposes Template Haskell functions for computing the mutually recursive binding groups for data and type synonym declarations, excluding those that use type families. This includes a convenient type class for gathering the type constructor names that occur within a TH Info/Dec/Type value.
A conditional expression has the form:
> if e1 then e2 else e3
and returns the value of e2 if the value of e1 is True, e3 if e1 is False, and _|_ otherwise.
> max a b = if a > b then a else b
Video Compression Library (see http:theora.org)
Small and simple library for computing values of Theta functions. They're the special functions of two variables. Described very well at https://en.wikipedia.org/wiki/Theta_function. Library exports four theta-functions and a small helper to calculate their second parameter. Theta functions are functions of Complex variables, FYI.
Show more results