
16 Nov
2006
16 Nov
'06
1:52 a.m.
Simon Peyton-Jones wrote:
3. Dictionaries are packaged in data constructors
This feature has been often requested, becuase it allows you to package a dictionary into an ordinary (non-existential) data type, and be able to use it.
Indeed, one can now simply reify class instances: data NumInst a where MkNumInst :: Num a => NumInst a intInst :: NumInst Int intInst = MkNumInst plus :: NumInst a -> a -> a -> a plus MkNumInst p q = p + q Expect a whole new batch of type shenanigans from Oleg. -- Ashley Yakeley Seattle, WA