newtype

A typeclass and set of functions for working with newtypes.

Version on this page:0.2.2.0@rev:2
LTS Haskell 22.14:0.2.2.0@rev:3
Stackage Nightly 2024-03-28:0.2.2.0@rev:3
Latest on Hackage:0.2.2.0@rev:3

See all snapshots newtype appears in

BSD-3-Clause licensed by Herbert Valerio Riedel, Darius Jahandarie, Conor McBride
Maintained by [email protected]
This version can be pinned in stack with:newtype-0.2.2.0@sha256:36cb7b6a0e2ae2896d88dddf1ff22edbc9e5df02f02b3765be2533b6bc97d97d,1354

Module documentation for 0.2.2.0

Depends on 1 package(full list with versions):
Used by 1 package in nightly-2022-03-22(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. See Control.Newtype for documentation and examples.

Changes

See also https://pvp.haskell.org/faq

0.2.2.0 (minor)

  • Provide safe Coercible-based default-methods for pack/unpack (#1)

0.2.1.0 (minor)

  • Added Newtype instances for
    • Data.Fixed.Fixed
    • Data.Functor.Compose.Compose
    • Data.Functor.Identity.Identity
    • Data.Monoid.Alt
    • Data.Monoid.Ap
    • Data.Monoid.Dual
    • Data.Ord.Down
  • Declare Control.Newtype explicitly as Trustworthy under SafeHaskell