A grab bag of useful 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.
Changes
Revision history for th-extras
0.1.0.0 - 2026-11-27
Major version bump due to behaviour changes rather than ABI changes.
occursInType now finds variables in kinds and contexts.
namesBoundInDec also returns constructors, fields, methods and
families, so genericalizeDecs renames more names.
substVarsWith renames clashing binders, substitutes kinds, leaves
existential and index variables alone instead of crashing, and looks
through parentheses and kind signatures.
kindArity and tyConArity give different arities in some cases.
headOfType, decCons and namesBoundInPat handle cases that
previously crashed or were missed.
Drop support for ghc-8.0 and ghc-8.2.
0.0.0.9 - 2026-02-11
Support a bunch of new Type constructors in substVarsWith.