On 15 March 2011 19:21, Amitava Shee
<amitava.shee@gmail.com> wrote:
*Kind> yesno 10
<interactive>:1:6:
Ambiguous type variable `t' in the constraints:
`Num t' arising from the literal `10' at <interactive>:1:6-7
`Yesno t' arising from a use of `yesno' at <interactive>:1:0-7
Probable fix: add a type signature that fixes these type variable(s)
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.
Try yesno (10 :: Int), and check section 2.4.5 of [1].
Hope this helps,
--
Ozgur Akgun