
12 Mar
2007
12 Mar
'07
7:41 a.m.
Hi
increase :: NumDictionary a -> a -> a
where NumDictionary is a data value which contains the implementations of the methods of the num class.
It might look something like this:
data NumDictionary a = NumDict { numPlus :: a -> a -> a , numTimes :: a -> a -> a , numFromInteger :: Integer -> a ... and so on ... }
Hopefully my explanation is correct and helpful.
Much clearer than my explanation. The only slight detail is that Yhc uses tuples for the dictionaries, although we're not convinced that is a great idea anyway. Thanks Neil