29 Jul
2002
29 Jul
'02
9:26 a.m.
| I've often felt a tinge of disappointment not being able to | derive classes over data structures that are defined in the | libraries (DeepSeq FiniteMap, for instance). I was wondering | if any of the tools (drift, etc.) or GHCs built-in meta | programming would allow you to say something like: | | derive (DeepSeq a, DeepSeq b) => DeepSeq (FiniteMap a b) I think Hal was only suggesting doing this in case where the representation of the data structure was visible to the library client. (As others have said, it's not a good idea if the rep is abstract.) Template Haskell will be able to do this. Heart transplant operation is in progress. Blood on floor, but patient still alive. Simon