The deriving-compat package

[Tags:bsd3, library, test]

Provides Template Haskell functions that mimic deriving extensions that were introduced or modified in recent versions of GHC. Currently, the following typeclasses/extensions are covered:

See the Data.Deriving module for a full list of backported changes.

Note that some recent GHC typeclasses/extensions are not covered by this package:


[Skip to Readme]

Properties

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 (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.13), transformers (>=0.2), transformers-compat (>=0.5) [details]
License BSD3
Copyright (C) 2015-2017 Ryan Scott
Author Ryan Scott
Maintainer Ryan Scott <ryan.gl.scott@gmail.com>
Category Compatibility
Home page https://github.com/haskell-compat/deriving-compat
Bug tracker https://github.com/haskell-compat/deriving-compat/issues
Source repository head: git clone https://github.com/haskell-compat/deriving-compat
Uploaded Tue Apr 11 00:11:05 UTC 2017 by ryanglscott
Distributions LTSHaskell:0.3.6, NixOS:0.3.6, Stackage:0.3.6, Tumbleweed:0.3.6
Downloads 3130 total (1469 in the last 30 days)
Votes
0 []
Status Docs available [build log]
Last success reported on 2017-04-11 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Flags

NameDescriptionDefaultType
base-4-9

Use base-4.9 or later.

EnabledAutomatic
template-haskell-2-11

Use template-haskell-2.11.0.0 or later.

EnabledAutomatic
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.

EnabledAutomatic

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for deriving-compat

Readme for deriving-compat-0.3.6

deriving-compat

Hackage Hackage Dependencies Haskell Programming Language BSD3 License Build

Provides Template Haskell functions that mimic deriving extensions that were introduced or modified in recent versions of GHC. Currently, the following typeclasses/extensions are covered:

  • Deriving Bounded
  • Deriving Enum
  • Deriving Ix
  • Deriving Eq, Eq1, and Eq2
  • Deriving Ord, Ord1, and Ord2
  • Deriving Read, Read1, and Read2
  • Deriving Show, Show1, and Show2
  • DeriveFoldable
  • DeriveFunctor
  • DeriveTraversable

See the Data.Deriving module for a full list of backported changes.

Note that some recent GHC typeclasses/extensions are not covered by this package:

  • DeriveDataTypeable
  • DeriveGeneric, which was introducted in GHC 7.2 for deriving Generic instances, and modified in GHC 7.6 to allow derivation of Generic1 instances. Use Generics.Deriving.TH from generic-deriving to derive Generic(1) using Template Haskell.
  • DeriveLift, which was introduced in GHC 8.0 for deriving Lift instances. Use Language.Haskell.TH.Lift from th-lift to derive Lift using Template Haskell.
  • The Bifunctor typeclass, which was introduced in GHC 7.10, as well as the Bifoldable and Bitraversable typeclasses, which were introduced in GHC 8.2. Use Data.Bifunctor.TH from bifunctors to derive these typeclasses using Template Haskell.