<div dir="ltr"><font color="#003333"><font size="2"><font face="trebuchet ms,sans-serif">A few answers back, Matthew Coolbeth wrote, </font></font></font><div><font color="#003333"><font size="2"><font face="trebuchet ms,sans-serif"><br>
</font></font></font></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><span class="Apple-style-span" style="border-collapse: collapse; "><font class="Apple-style-span" face="arial, helvetica, sans-serif">(show v) where v is of type Test will evaluate to (showPrec v), and that (showPrec v) will evaluate to (show v). It should be clear that this is a cyclic evaluation that will not terminate.</font></span></div>
</blockquote><div><span class="Apple-style-span" style="border-collapse: collapse; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif"><font class="Apple-style-span" color="#003333"><br></font></font></span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif"><font class="Apple-style-span" color="#003333">Presumably that was intentional. But why was that necessary? It seems like strange coding. Furthermore, why isn't</font></font></span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif"><font class="Apple-style-span" color="#003333"><br></font></font></span></div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><span class="Apple-style-span" style="border-collapse: collapse; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif"><font class="Apple-style-span" color="#003333">instance Show Test</font></font></span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif"><font class="Apple-style-span" color="#003333"><br></font></font></span></div>
</blockquote><div><span class="Apple-style-span" style="border-collapse: collapse; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif"><font class="Apple-style-span" color="#003333">interpreted to mean</font></font></span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif"><font class="Apple-style-span" color="#003333"><br></font></font></span></div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><span class="Apple-style-span" style="border-collapse: collapse; "><font class="Apple-style-span" face="'trebuchet ms', sans-serif"><font class="Apple-style-span" color="#003333">data Test = Test deriving (Show)</font></font></span></div>
</blockquote><div><div dir="ltr"><font><font face="'trebuchet ms', sans-serif"><i><font color="#003333"><br>-- Russ </font></i></font></font></div><br>
<br><br><div class="gmail_quote">On Tue, Nov 16, 2010 at 10:27 AM, Tobias Brandt <span dir="ltr"><<a href="mailto:tob.brandt@googlemail.com">tob.brandt@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On 16 November 2010 19:17, Edward Z. Yang <<a href="mailto:ezyang@mit.edu">ezyang@mit.edu</a>> wrote:<br>
> It seems to me that there is a possibility we could reify some information<br>
> that is traditionally specified in the documentation: that is, what<br>
> functions must be defined by a minimal instance, which could then give<br>
> GHC enough information to give meaningful warnings if not all functions<br>
> for a minimal instance are proviced.<br>
<br>
</div></div>One could use a compiler pragma the defines possible sets of minimal<br>
definitions, e.g.<br>
{-# MINIMAL_DEF Num ((+),(*),abs,signum,fromInteger,(-)),<br>
((+),(*),abs,signum,fromInteger,negate) #-}<br>
<br>
one could even add logical notation, like:<br>
{-# MINIMAL_DEF Num ((+), (*), abs, signum, fromInteger, (-) || negate) #-}<br>
</blockquote></div><br></div></div>