<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Aug 8, 2015 at 5:16 PM, Tom Ellis <span dir="ltr"><<a href="mailto:tom-lists-haskell-cafe-2013@jaguarpaw.co.uk" target="_blank">tom-lists-haskell-cafe-2013@jaguarpaw.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sat, Aug 08, 2015 at 05:13:30PM -0400, Brandon Allbery wrote:<br>
> On Sat, Aug 8, 2015 at 5:11 PM, Tom Ellis <<br>
> <a href="mailto:tom-lists-haskell-cafe-2013@jaguarpaw.co.uk">tom-lists-haskell-cafe-2013@jaguarpaw.co.uk</a>> wrote:<br>
><br>
> > No, not at all. I'm making a much stronger claim than that. I'm claiming<br>
> > the functionality provided by newtype is completely subsumed by that<br>
> > provided by data.<br>
><br>
> When did `data` start guaranteeing that the representation of a single<br>
> constructor, strict `data' wrapper around another type is exactly the same<br>
> as the wrapped type?<br>
<br>
</span>I make no claims about the operational semantics of existing compilers, but<br>
can you point out a reason why data of a single strict field *shuoldn't* be<br>
compiled in the same way as a newtype?</blockquote><div><br></div><div>Because it's a bizarre special case compared to the way `data` works for everything else?</div><div><br></div><div>Also, the behavior I described is not something that can just be ignored as an optimization in a particular compiler. It is part of the language specification. In fact, it is the *primary reason* for the existence of `newtype`.</div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>brandon s allbery kf8nh sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a> <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div></div>
</div></div>