<div dir="ltr">Hello,<br><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 8, 2013 at 1:39 AM, Simon Peyton-Jones <span dir="ltr">&lt;<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-GB" link="blue" vlink="purple">
<div><div class="im">
<p class="MsoNormal">What I would like to see is something like:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;">HsApp (HsApp (HsApp (HsVar &quot;foldl&#39;&quot;) (HsVar &quot;+&quot;)) (HsLit 0)) (HsVar &quot;xs&quot;)</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
</div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">We could derive ‘Show’ on everything but that would generate a LOT of new code, that would seldom be used.  Also ‘Show’ doesn’t pretty-print so the result would
 be illegible. <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> </span></p></div></div></blockquote><div style>I have a package called &quot;pretty-show&quot;, which can convert standard `Show` instances into human-readable form, and it can also produce HTML renditions of `Show`-ed data structures.  It is very useful for debugging or learning a new code base.</div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-GB" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;;color:#1f497d">I’m a bit dubious.  Maybe a better thing might be to improve the existing pretty-printer so it gave you the cues you are looking for?<br>

<br></span></p></div></div></blockquote><div style>Agreed that this is probably a better solution, although having derived `Show` instances would allow one to see exactly what data-structure was produced at some point, which can be helpful when figuring out how some part of GHC works.</div>
<div><br></div><div style>-Iavor</div><div><br></div></div></div></div>