transformers 0.4: change in accessor function exports?
Ross Paterson
R.Paterson at city.ac.uk
Tue May 6 17:18:46 UTC 2014
On Tue, May 06, 2014 at 07:16:40PM +0300, Michael Snoyman wrote:
> One of the changes[1] in transformers 0.4 is as follows:
>
> 0.3:
>
> newtype Identity a = Identity { runIdentity :: a }
>
> 0.4:
>
> newtype Identity a = Identity a
> runIdentity (Identity x) = x
>
> While this may seem benign, I've already seen three cases where this caused
> breakage[2][3][4].
>
> Is there a reason for this change in 0.4? If not, I'd like to request moving
> back to the previous formulation to avoid unnecessary breakage.
Read and Show instances were introduced in 0.4. With the record form,
the default instances for those classes would be very cumbersome.
The alternative of defining custom instances that differ from the default
ones would make the interface more confusing.
More information about the Libraries
mailing list