
14 Apr
2010
14 Apr
'10
3:45 a.m.
Hi Phyx,
instance Foo Int# Int where bar = iBox
What you want is not currently possible, for many of the same reasons that you cannot instantiate polymorphic types (e.g. that of id) at unboxed types. Because you can't then be polymorphic in the "a" in "Foo a b" if a might be an unboxed type, writing such a type class would be slightly less useful than normal - you would get name overloading, but not the ability to abstract over the type class in a meaningful way. Cheers, Max