classes and instances

Ashley Yakeley ashley@semantic.org
Thu, 4 Oct 2001 15:48:41 -0700


At 2001-10-04 08:31, Russo, Tom wrote:

>Main> int 5
>ERROR - Unresolved overloading
>*** Type       : (Num a, ToInt a) => Int
>*** Expression : int 5
>
>Can someone explain what the problem is, and how to interpret the error
>message I'm getting?

Oh, 5 isn't necessarily an Int. It's of type "Num a => a", which is more 
general. You can restrict it to Int with "(5 :: Int)".

-- 
Ashley Yakeley, Seattle WA