deriving-compat: Backports of GHC deriving extensions
Provides Template Haskell functions that mimic deriving extensions that were introduced or modified in recent versions of GHC. Currently, the following extensions are covered:
The following changes have been backported:
In GHC 8.0,
DeriveFoldablewas changed to allow folding over data types with existential constraints.
In GHC 8.0,
DeriveTraversablewere changed so as not to generate superfluous
pureexpressions in generated code. As a result, this allows deriving
Traversableinstances for datatypes with unlifted argument types.
In GHC 8.0, deriving
Showwas changed so that constructor fields with unlifted types are no longer shown with parentheses, and the output of showing an unlifted type is suffixed with the same number of hash signs as the corresponding primitive literals.
In GHC 8.2, deriving
Ordwas changed so that it generates concrete
if-expressions that are not subject to
Note that some recent GHC extensions are not covered by this package:
DeriveGeneric, which was introducted in GHC 7.2 for deriving
Genericinstances, and modified in GHC 7.6 to allow derivation of
Generic(1)using Template Haskell.
DeriveLift, which was introduced in GHC 8.0 for deriving
Liftusing Template Haskell.
[Skip to Readme]
|Versions||0.1, 0.2, 0.2.1, 0.2.2, 0.3, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.4, 0.4.1, 0.4.2, 0.4.3, 0.5, 0.5.1, 0.5.2 (info)|
|Dependencies||base (>=4.3 && <5), containers (>=0.1 && <0.6), ghc-boot-th, ghc-prim, template-haskell (>=2.5 && <2.12), transformers (>=0.2), transformers-compat (>=0.5) [details]|
|Copyright||(C) 2015-2016 Ryan Scott|
|Maintainer||Ryan Scott <email@example.com>|
|Source repo||head: git clone https://github.com/haskell-compat/deriving-compat|
|Uploaded||by ryanglscott at Mon Jul 18 17:57:28 UTC 2016|
|Distributions||LTSHaskell:0.5.1, NixOS:0.5.1, Stackage:0.5.2|
|Downloads||8234 total (242 in the last 30 days)|
|Rating||(no votes yet) [estimated by rule of succession]|
|Status||Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI
Use base-4.9 or later.
Use template-haskell-22.214.171.124 or later.
Use a version of transformers or transformers-compat with a modern-style Data.Functor.Classes module. This flag cannot be used when building with transformers-0.4, since it comes with a different version of Data.Functor.Classes.
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
For package maintainers and hackage trustees