LicenseRef-PublicDomain licensed by James Cook
Maintained by Erik de Castro Lopo
This version can be pinned in stack with:th-extras-0.1.0.0@sha256:cee5871c3891b22aadfe5d88c65068697869e1a61d237abaa7b283f0fa343c4e,2497

Module documentation for 0.1.0.0

Used by 1 package in nightly-2026-11-28(full list with versions):

th-extras

Haskell Hackage Hackage CI Github CI Public Domain

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.

0.0.0.8 - 2024-04-14

  • Allow th-abstraction-0.7
  • New package maintainer

0.0.0.7 - 2023-12-15

  • Support GHC 9.6 and 9.8

0.0.0.6 - 2022-01-04

  • Fix GHC 8.0 build

  • Support GHC 9.0 and 9.2

0.0.0.5 - 2019-05-13

  • Improve support for various corner cases

  • Ensure works with a range of GHCs.

0.0.0.4 - 2016-05-10

  • Support GHC 8.0

0.0.0.2 - 2012-01-13

  • Added some more utility functions

0.0.0.1 - 2011-11-15

  • Initial release