Version 2 (modified by ross@…, 12 years ago) (diff)

Generalised deriving for newtype

See ExtensionDescriptionHowto for information on how to write these extension descriptions. Please add any new extensions to the list of HaskellExtensions.

Brief Explanation

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"