lift-generics: GHC.Generics-based Language.Haskell.TH.Syntax.lift implementation
This package provides a GHC.Generics-based
function (only available on GHC 7.4 and later), as well as
genericLiftWithPkgFallback function (for code that
must support GHC 7.2 and earlier) and a
genericLiftWithPkg function (for use when neither of the
above will work), all 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
implementation prior to GHC 8.0. For GHC 7.4 and later, we
can pluck this information out of
Typeable. For earlier
versions, and where
Typeable isn't available,
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 7.4 and
later: simply use the
genericLift function, and life is good.
[Skip to Readme]
- lift-generics-0.2.1.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
|Versions [RSS]||0.1, 0.1.1, 0.1.2, 0.1.3, 0.2, 0.2.1|
|Dependencies||base (>=4.3 && <5), generic-deriving (>=1.9 && <2), ghc-prim, tagged (>=0.5 && <0.9), template-haskell (>=2.4 && <2.22), th-compat (>=0.1 && <0.2) [details]|
|Copyright||(C) 2015-2017 Ryan Scott|
|Maintainer||Ryan Scott <email@example.com>|
|Revised||Revision 6 made by ryanglscott at 2023-09-30T12:51:46Z|
|Source repo||head: git clone https://github.com/RyanGlScott/lift-generics|
|Uploaded||by ryanglscott at 2021-09-16T12:03:56Z|
|Distributions||LTSHaskell:0.2.1, NixOS:0.2.1, Stackage:0.2.1|
|Reverse Dependencies||1 direct, 0 indirect [details]|
|Downloads||3483 total (15 in the last 30 days)|
|Rating||(no votes yet) [estimated by Bayesian average]|
|Status||Docs available [build log]
Last success reported on 2021-09-16 [all 1 reports]