Changes between Version 1 and Version 2 of NewtypeDeriving


Ignore:
Timestamp:
Dec 1, 2005 2:27:53 PM (10 years ago)
Author:
ross@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NewtypeDeriving

    v1 v2  
    66== Brief Explanation ==
    77
     8The `deriving` clause on a `newtype` can list any class.  For any class except `Read`, `Show`, `Typeable` or `Data`, the instance is "the same" as for the wrapped type.
     9
    810== References ==
    9  * [http://www.haskell.org/ghc/docs/latest/html/users_guide/type-extensions.html#newtype-deriving] GHC documentation.
     11 * [http://www.haskell.org/ghc/docs/latest/html/users_guide/type-extensions.html#newtype-deriving  GHC documentation]
    1012
    1113== Pros ==
    12 
     14 * saves on repetitious boilerplate, significantly lowering the cost of `newtype`
    1315
    1416== Cons ==
     17 * difficult to specify without saying "the same representation"