hobwekiva / newtypes

MIT License
115 stars 4 forks source link

Newtype typeclass? #1

Open hobwekiva opened 7 years ago

hobwekiva commented 7 years ago

https://pursuit.purescript.org/packages/purescript-newtype/2.0.0/docs/Data.Newtype

wedens commented 7 years ago

Just to mention it. There is Wrapped typeclass in monocle with the same purpose.

sellout commented 7 years ago

@wedens In the port of Monocle to Cats, Wrapped is no longer a type class and instead depends on the Newtype type class in newts. Providing a similar type class here will make it easier to replace newts with newtypes down the road.

acjay commented 7 years ago

Is the idea here automatically deriving typeclasses for Newtype types, where a type class for the underlying type exists?