|Version 2 (modified by ross@…, 10 years ago) (diff)|
Generalised deriving for newtype
The 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.
- saves on repetitious boilerplate, significantly lowering the cost of newtype
- difficult to specify without saying "the same representation"