Modulegeneric-data-1.1.0.2Haskell2010
Generic.Data.Internal.Newtype
Pack/unpack newtypes.
Warning
This is an internal module: it is not subject to any versioning policy, breaking changes can happen at any time.
If something here seems useful, please report it or create a pull request to export it from an external module.
- 2 types
- 1 class
- 2 values
- Packagegeneric-data-1.1.0.2
- Exports7
- LanguageHaskell2010
- LicenceMIT
- SourceNewtype.hs
The type wrapped by a newtype.
newtype Foo = Foo { bar :: Bar } deriving Generic
-- Old Foo ~ Bar
Use Newtype instead.
Equations
NewtypeErr a 'True = ()NewtypeErr a 'False = TypeError (('Text"The type "
':<>: 'ShowType a) ':<>: 'Text" is not a newtype."
)
Generic newtype destructor.
Generic newtype constructor.