# th-lift

> Derive Template Haskell's Lift class for datatypes

Source: https://talira.ai/catalog/th-lift-24br7pf5
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [developer tools / code generation](https://talira.ai/categories/developer-tools/code-generation), [languages / haskell](https://talira.ai/categories/languages/haskell)
- Licence: GPL-2.0-only OR th-lift BSD 3-clause licence[^2][^3]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Ryan Scott](https://talira.ai/orgs/ryan-scott.md)

th-lift derives Template Haskell's `Lift` class for Haskell datatypes using `TemplateHaskell`. Its own README says GHC's `DeriveLift` extension has largely taken over this job since GHC 8.0, so it's now mainly a way to bring later `DeriveLift` bug fixes to older GHC versions.

## Links

- GitHub: https://github.com/RyanGlScott/th-lift

## Problems it solves

- derive Lift instances for my datatypes on an older GHC
- get fixed DeriveLift behaviour on GHC versions that still have the bug
- use a value of my own type inside a Template Haskell splice

## Features

- derives Lift instances for datatypes with Template Haskell
- backports DeriveLift bug fixes to older GHC versions

## Limitations

- GHC's DeriveLift extension does the same job built in since GHC 8.0, which has largely replaced this package[^1]
- Only useful for projects that still support GHC versions older than the DeriveLift fixes they need[^1]

## Trust

Overall: 0.23 out of 1.
Signals: maintenance 0.27, adoption 0.23, momentum 0.01, community 0.48, backing 0.30, extensibility 0.00.

- 13 GitHub stars
- 15 contributors
- backed by Ryan Scott

Warnings:

- last commit 11 months ago

## Alternatives

- [haskell-src-meta](https://talira.ai/catalog/haskell-src-meta-kffmf4w7.md): Parse Haskell source to Template Haskell syntax

## Sources

[^1]: https://github.com/RyanGlScott/th-lift/blob/master/README.md (checked 29 Nov 2026)
[^2]: https://github.com/RyanGlScott/th-lift/blob/master/BSD3 (checked 29 Nov 2026)
[^3]: https://github.com/RyanGlScott/th-lift/blob/master/th-lift.cabal (checked 29 Nov 2026)
