Albert Y. C. Lai wrote:
Andrew Coppin wrote:
If I understand this correctly, to solve this problem you need either
Functional Dependencies or Associated Types. Is that correct?
A motivating example in papers on FD is exactly typeclasses for
containers. Okasaki puts this into practice in the Edison library.
Despite its comprehensiveness, elegance, and the Okasaki name brand,
it did not become mainstream. I don't know why.
Can anybody actually demonstrate concretely how FDs and/or ATs would
solve this problem? (I.e., enable you to write a class that any
container can be a member of, despite constraints on the element types.)
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe