generic-deriving

Generic programming library for generalised deriving.

https://github.com/dreixel/generic-deriving

Version on this page:1.9.0@rev:1
LTS Haskell 22.18:1.14.5@rev:3
Stackage Nightly 2024-04-24:1.14.5@rev:3
Latest on Hackage:1.14.5@rev:3

See all snapshots generic-deriving appears in

BSD-3-Clause licensed by José Pedro Magalhães
Maintained by [email protected]
This version can be pinned in stack with:generic-deriving-1.9.0@sha256:ffc03b6a6adb54c6433a7af5956e420d65c151a820047189cf3150b387e769ef,2763

generic-deriving: Generic programming library for generalised deriving

Hackage Hackage Dependencies Haskell Programming Language BSD3 License Build

This package provides functionality for generalising the deriving mechanism in Haskell to arbitrary classes. It was first described in the paper:

The current implementation integrates with the new GHC Generics. See http://www.haskell.org/haskellwiki/GHC.Generics for more information. Template Haskell code is provided for supporting older GHCs.

Changes

1.9.0

  • Allow deriving of Generic1 using Template Haskell
  • Allow deriving of Generic(1) for data families
  • Allow deriving of Generic(1) for constructor-less plain datatypes (but not data families, due to technical restrictions)
  • Support for unboxed representation types on GHC 7.11+
  • More GCopoint, GEnum, GEq, GFoldable, GFunctor, GIx, GMonoid, GShow, and GTraversable instances
  • The field accessors for the (:+:) type in Generics.Deriving.Base have been removed to be consistent with GHC.Generics
  • Ensure that TH generates definitions for isNewtype and packageName, if a recent-enough version of GHC is used
  • Ensure that TH-generated names are unique for a given data type’s module and package (similar in spirit to Trac #10487)
  • Allow building on stage-1 compilers