A typeclass and set of functions for working with newtypes

Version on this page:0.5.4@rev:1
LTS Haskell 22.30:0.6.2@rev:4
Stackage Nightly 2024-07-23:0.6.2@rev:4
Latest on Hackage:0.6.2@rev:4

See all snapshots newtype-generics appears in

BSD-3-Clause licensed by Darius Jahandarie, Conor McBride, João Cristóvão, Simon Jakobi
Maintained by Simon Jakobi
This version can be pinned in stack with:newtype-generics-0.5.4@sha256:6767d699fb5a78e3ad13a1a7c2294f1bdde49dbd203bedbc6e7f0999af51a9c5,2136

Module documentation for 0.5.4

Depends on 2 packages(full list with versions):
Used by 3 packages in lts-15.3(full list with versions):

Per Conor McBride, the Newtype typeclass represents the packing and unpacking of a newtype, and allows you to operate under that newtype with functions such as ala. Generics support was added in version 0.4, making this package a full replacement for the original newtype package, and a better alternative to newtype-th.


Changelog for newtype-generics

0.5.4 – 2019-09-10

  • Add Newtype instance for Data.Monoid.Ap.
  • Support GHC-8.8.

0.5.3 – 2018-03-23

  • All code was moved to a new Control.Newtype.Generics module.
  • Control.Newtype re-exports Control.Newtype.Generics, but is deprecated and will be removed in the next major release. – 2018-03-16

  • Adjust bounds for base and transformers – 2018-02-16

  • Reupload due to README encoding issue

0.5.2 – 2018-02-16


  • under2
  • over2


  • Various documentation improvements



  • Add more instances from base


  • Compatibility with GHC 8.2.1



  • Relax types of underF and overF to allow different input & output functors