<div class="gmail_quote">On 15 March 2011 19:21, Amitava Shee <span dir="ltr">&lt;<a href="mailto:amitava.shee@gmail.com">amitava.shee@gmail.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 id=":1o8">*Kind&gt; yesno 10<br><br>&lt;interactive&gt;:1:6:<br>    Ambiguous type variable `t&#39; in the constraints:<br>      `Num t&#39; arising from the literal `10&#39; at &lt;interactive&gt;:1:6-7<br>      `Yesno t&#39; arising from a use of `yesno&#39; at &lt;interactive&gt;:1:0-7<br>

    Probable fix: add a type signature that fixes these type variable(s)</div></blockquote></div><div><br></div>The literal 10 has type (Num n =&gt; n), however, due to ghci&#39;s defaulting rules, it defaults to Integer, hence the error you&#39;ve experienced.<div>
<br></div><div>Try yesno (10 :: Int), and check section 2.4.5 of [1].</div><div><br></div><div>[1] <a href="http://www.haskell.org/ghc/docs/7.0.2/html/users_guide/interactive-evaluation.html">http://www.haskell.org/ghc/docs/7.0.2/html/users_guide/interactive-evaluation.html</a></div>
<div><br></div><div>Hope this helps,<br clear="all"><br>-- <br>Ozgur Akgun<br>
</div>