<div class="gmail_quote">On 15 March 2011 19:21, Amitava Shee <span dir="ltr"><<a href="mailto:amitava.shee@gmail.com">amitava.shee@gmail.com</a>></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> yesno 10<br><br><interactive>:1:6:<br> Ambiguous type variable `t' in the constraints:<br> `Num t' arising from the literal `10' at <interactive>:1:6-7<br> `Yesno t' arising from a use of `yesno' at <interactive>: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 => n), however, due to ghci's defaulting rules, it defaults to Integer, hence the error you'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>