th-utilities: Collection of useful functions for use with Template Haskell

[ library, mit, template-haskell ] [ Propose Tags ]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS],,,,,,,,,,,,,,
Change log
Dependencies base (>=4.7 && <5), bytestring, containers, directory, filepath, primitive, syb, template-haskell (>=2.7), text, th-abstraction (>=0.4), th-orphans [details]
License MIT
Copyright 2016 FP Complete
Maintainer Michael Sloan <>
Category Template Haskell
Home page
Bug tracker
Source repo head: git clone
Uploaded by MichaelSloan at 2022-09-21T03:38:20Z
Distributions Arch:, Debian:, LTSHaskell:, NixOS:, Stackage:
Reverse Dependencies 9 direct, 75 indirect [details]
Downloads 40210 total (205 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-09-21 [all 1 reports]

Readme for th-utilities-

[back to package description]


Build Status

The 'th-utilities' package provides a number of useful utilities for Template Haskell. In particular:

  • TH.Derive provides a convenient system for using TH to derive typeclass instances. It allows for open registration of TH derivers, and reuses instance syntax for invoking them.

  • TH.ReifyDataType provides utilities for reifying simplified datatype info. It omits details that you don't usually want to handle, making it much more straightforward to generate code based on datatype structure.

  • TH.RelativePaths provides utilities for loading files based on paths relative to the cabal file. This is particularly handy for loading code into ghci even when its current dir isn't the package dir. Ideally, this module would be used by everyone who currently uses qAddDependentFile.

  • TH.Utilities provides a miscellaneous set of utilities that are useful within this package and elsewhere.