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:
DeriveFoldable
DeriveFunctor
DeriveTraversable
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,
DeriveFoldableandDeriveTraversablewere changed so as not to generate superfluousmemptyorpureexpressions in generated code. As a result, this allows derivingTraversableinstances 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.
Note that some recent GHC extensions are not covered by this package:
DeriveGeneric, which was introducted in GHC 7.2 for derivingGenericinstances, and modified in GHC 7.6 to allow derivation ofGeneric1instances. UseGenerics.Deriving.THfromgeneric-derivingto deriveGeneric(1)using Template Haskell.DeriveLift, which was introduced in GHC 8.0 for derivingLiftinstances. UseLanguage.Haskell.TH.Liftfromth-liftto deriveLiftusing Template Haskell.
[Skip to Readme]
Flags
Automatic Flags
| Name | Description | Default |
|---|---|---|
| base-4-9 | Use base-4.9 or later. | Enabled |
| template-haskell-2-11 | Use template-haskell-2.11.0.0 or later. | Enabled |
| new-functor-classes | 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. | Enabled |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- deriving-compat-0.2.2.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 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, 0.5.3, 0.5.4, 0.5.5, 0.5.6, 0.5.7, 0.5.8, 0.5.9, 0.5.10, 0.6, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 0.6.7, 0.6.8 (info) |
|---|---|
| Change log | CHANGELOG.md |
| 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] |
| Tested with | ghc ==7.0.4, ghc ==7.2.2, ghc ==7.4.2, ghc ==7.6.3, ghc ==7.8.4, ghc ==7.10.3, ghc ==8.0.1 |
| License | BSD-3-Clause |
| Copyright | (C) 2015-2016 Ryan Scott |
| Author | Ryan Scott |
| Maintainer | Ryan Scott <ryan.gl.scott@gmail.com> |
| Uploaded | by ryanglscott at 2016-06-20T02:39:21Z |
| Category | Compatibility |
| Home page | https://github.com/haskell-compat/deriving-compat |
| Bug tracker | https://github.com/haskell-compat/deriving-compat/issues |
| Source repo | head: git clone https://github.com/haskell-compat/deriving-compat |
| Distributions | Arch:0.6.7, Debian:0.5.9, Fedora:0.6.7, LTSHaskell:0.6.8, NixOS:0.6.7, Stackage:0.6.8 |
| Reverse Dependencies | 25 direct, 53 indirect [details] |
| Downloads | 49013 total (113 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs available [build log] Last success reported on 2016-06-20 [all 1 reports] |