Hi,<br><br><div class="gmail_quote">On 12 July 2011 16:15, Brent Yorgey <span dir="ltr">&lt;<a href="mailto:byorgey@seas.upenn.edu">byorgey@seas.upenn.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":199">This message is just because it cannot figure out the type of [] in<br>
&#39;putStrLn $ show $ halve []&#39;.  You can write<br>
<br>
  putStrLn $ show $ halve ([] :: [Int])<br>
<br>
to give it an explicit type.  It&#39;s a bit annoying since we happen to<br>
know that the type of the list makes no difference, but the compiler<br>
can&#39;t figure that out.</div></blockquote><div><br></div><div>Actually, the type of the list does make a difference due to different show instances. Try:</div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br>
</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">putStrLn $ show $ halve ([] :: [Char])</font></div><br></div><div class="gmail_quote">Cheers,</div>Ozgur