A simple problem

Saswat Anand iscp9157@nus.edu.sg
Thu, 18 Jan 2001 21:16:03 +0800


class C a where
 fun :: a -> Integer

instance C Integer where
 fun x = x+ 1

with these definitons: 

fun 3  --gives error in Hugs
fun (3::Integer) -- OK

I am a building an embedded language, so don't want user to cast. Is there a
solution?

Thanks,
Saswat