
5 Oct
2006
5 Oct
'06
8:05 a.m.
On http://hackage.haskell.org/trac/haskell-prime/wiki/ DerivedInstances it says: "- There is no way to derive an instance of a class for a data type that is defined elsewhere (in another module)." Though there is no proposal to fix this. Would such a proposal be appropriate for Haskell'? If so, I propose to add a top-level declaration on the form: 'deriving' qtycls 'for' qtycon which produces the same instance as a deriving clause in the declaration of the datatype or newtype would. I have recently (thanks to the GHC Hackathon) implemented this in GHC. /Björn