<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Wouldn't it be simpler/less breaking to keep "newtype Identity a = Identity { runIdentity :: a }" and simply hand write Show/Read instances that function asif it was "newtype Identity a = Identity a", giving us best of both worlds?<div><br></div><div>Cheers,</div><div>Merijn<br><div><br><div><div>On May 6, 2014, at 23:30 , Edward Kmett wrote:</div><blockquote type="cite"><div dir="ltr">It may make the code in transformers a bit more confusing for a handful of instances, but this is breaking almost every user I've talked to.<div><br></div><div>This is proving to be a major breaking change as users commonly import StateT(..) and go off and use runStateT, etc.</div>
<div><div><br></div><div>I wrote the imports in mtl 2.2 in such a way that if you recanted and chose to switch back to the old style, it'd still work.</div><div><br></div><div>I just know that I personally have 200+ modules to change as a result, for no better experience as a user.</div>
<div><br></div><div>-Edward</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 7, 2014 at 3:18 AM, Ross Paterson <span dir="ltr"><<a href="mailto:R.Paterson@city.ac.uk" target="_blank">R.Paterson@city.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Tue, May 06, 2014 at 07:16:40PM +0300, Michael Snoyman wrote:<br>
> One of the changes[1] in transformers 0.4 is as follows:<br>
><br>
> 0.3:<br>
><br>
>     newtype Identity a = Identity { runIdentity :: a }<br>
><br>
> 0.4:<br>
><br>
>     newtype Identity a = Identity a<br>
>     runIdentity (Identity x) = x<br>
><br>
> While this may seem benign, I've already seen three cases where this caused<br>
> breakage[2][3][4].<br>
><br>
> Is there a reason for this change in 0.4? If not, I'd like to request moving<br>
> back to the previous formulation to avoid unnecessary breakage.<br>
<br>
</div>Read and Show instances were introduced in 0.4.  With the record form,<br>
the default instances for those classes would be very cumbersome.<br>
The alternative of defining custom instances that differ from the default<br>
ones would make the interface more confusing.<br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
</blockquote></div><br></div>
_______________________________________________<br>Libraries mailing list<br><a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>http://www.haskell.org/mailman/listinfo/libraries<br></blockquote></div><br></div></div></body></html>