
#13592: Newtype type class with compiler generated instances -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: feature | Status: new request | Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Define a `Newtype` class, autmatically generating instances {{{#!hs class Newtype n where type O n :: Type pack :: O n -> n unpack :: n -> O n }}} as defined in Conal's [http://conal.net/papers/generic-parallel-functional /generic-parallel-functional.pdf Generic parallel functional programming] but also found in the [https://hackage.haskell.org/package/newtype-0.2 newtype] and [https://hackage.haskell.org/package/lens-4.15.1/docs /Control-Lens-Wrapped.html lens] packages. I run into this class every once in a while -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13592 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler