Whoops, the &quot;data&quot; was just a braino on my part, sorry!<br><br><div class="gmail_quote">On Mon, Dec 19, 2011 at 4:45 PM, wren ng thornton <span dir="ltr">&lt;<a href="mailto:wren@freegeek.org">wren@freegeek.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 12/17/11 1:37 PM, Daniel Peebles wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
For the Read/Show instances, do we want manual ones<br>
that don&#39;t use the verbose record-style output? Since it&#39;s just defined as<br>
data ZipList a = ZipList { getZipList :: [a] } to get an easy accessor<br>
(does anyone actually use getZipList as a field for record updates?), it<br>
might be easier to write the projection manually and change the definition<br>
to data ZipList a = ZipList [a] with a separate getZipList function, so the<br>
deriving mechanism can give us a less noisy Show instance.<br>
</blockquote>
<br></div>
To deal with the ugliness of derived Show for single-field record types/newtypes I&#39;ve taken to just moving the projection function outside of the type definition. Though, if the data constructor is exported (which it hasn&#39;t been in my cases) the Haddock will suffer for the change. It&#39;s not that hard to just write a manual instance though...<br>

<br>
While we&#39;re on the topic, is there any reason why ZipList is a data type instead of a newtype? Is the extra bottom actually necessary for the Applicative semantics? If not, then I&#39;d suggest changing it to a newtype in order to remove the extra indirection.<span class="HOEnZb"><font color="#888888"><br>

<br>
-- <br>
Live well,<br>
~wren</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<u></u>_________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/<u></u>mailman/listinfo/libraries</a><br>
</div></div></blockquote></div><br>