You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prelude Newtypes lack of implicit coercion causes issues with interop with Newtypes from other libraries.
So in some of our services at work we have > 60 Newtypes which have to span libraries eg Smithy4s Newtypes and Prelude Newtypes, and for the transformations we use Chimney.
The smith4s newtypes have a Wrap/Unwrap typeclass called Bijection which is shown below
This type class is used to define implicit conversions via Chimney transformations.
Just about all the other Newtype libraries have some kind of coercion, however Prelude Newtypes do not - the team had provide a cake style hack to achieve this coercion ie:
Prelude Newtypes lack of implicit coercion causes issues with interop with Newtypes from other libraries.
So in some of our services at work we have > 60 Newtypes which have to span libraries eg Smithy4s Newtypes and Prelude Newtypes, and for the transformations we use Chimney.
The smith4s newtypes have a Wrap/Unwrap typeclass called
Bijection
which is shown belowThis type class is used to define implicit conversions via Chimney transformations.
Just about all the other Newtype libraries have some kind of coercion, however Prelude Newtypes do not - the team had provide a cake style hack to achieve this coercion ie:
cc @jdegoes
The text was updated successfully, but these errors were encountered: