GHC.Generics-based Language.Haskell.TH.Syntax.lift implementation

Version on this page:0.1.2@rev:2
LTS Haskell 22.26:0.2.1@rev:7
Stackage Nightly 2024-06-20:0.2.1@rev:7
Latest on Hackage:0.2.1@rev:7

See all snapshots lift-generics appears in

BSD-3-Clause licensed by Ryan Scott
Maintained by Ryan Scott
This version can be pinned in stack with:lift-generics-0.1.2@sha256:88163a9001d5def38c9230b88772468f3bec7963c78e3ea3be894f602f432e9c,3440

Module documentation for 0.1.2


Haskell Programming Language Hackage Dependencies Haskell Programming Language BSD3 License Build

This package provides a GHC.Generics-based genericLiftWithPkg function (intended for GHC 7.10 and earlier), as well as a genericLift function (only available on GHC 8.0 and later), both of which can be used for providing a Language.Haskell.TH.Syntax.lift implementation. See the documentation in the Language.Haskell.TH.Lift.Generics module to get started.

Credit goes to Matthew Pickering for suggesting this idea.

Note that due to API limitations, GHC.Generics wasn’t powerful enough to come up with the entirety of a lift implementation prior to GHC 8.0. For this reason, genericLiftWithPkg requires you to produce the package name yourself, which proves to be no small feat (see the documentation for more info).

Luckily, you don’t have to jump through as many hoops on GHC 8.0 and later: simply use the genericLift function, and life is good.



  • Add a case for V1 (i.e., empty data types), which diverges in the way you’d expect.


  • Fix test suite on GHC 8.0


  • Initial commit