newtype

A typeclass and set of functions for working with newtypes.

LTS Haskell 16.19:0.2.2.0@rev:1
Stackage Nightly 2020-10-19:0.2.2.0@rev:1
Latest on Hackage:0.2.2.0@rev:1

See all snapshots newtype appears in

BSD-3-Clause licensed by Herbert Valerio Riedel, Darius Jahandarie, Conor McBride
Maintained by hvr@gnu.org

Module documentation for 0.2.2.0

This version can be pinned in stack with:newtype-0.2.2.0@sha256:44435da250d96ab3a5a861425739f6af523495d1a3943f783df4b053b8a4c108,1354

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
Depends on 1 package(full list with versions):
Used by 2 packages in lts-16.18(full list with versions):