[Haskell-cafe] The container problem

Andrew Coppin andrewcoppin at btinternet.com
Sat Sep 27 13:23:47 EDT 2008

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.)

More information about the Haskell-Cafe mailing list