On Mon, Feb 7, 2011 at 10:01 PM, Andrew Coppin <andrewcop...@btinternet.com> wrote: >> I think haskell2010's type system is just not expressive enough to >> create interface generic enough. It's not possible to create type class >> which will work for both ByteStrings (or IntSet) and lists. > > It seems that most people agree: The reason why we don't have container > classes is that it's difficult to define them in a completely type-safe > mannar. > > (The OOP people, of course, just don't bother trying. They use typecasts > everywhere...) > > Do associated types solve this? Or are there still problems?
Duncan showed me a definition using associated types, which I have unfortunately forgotten. Johan _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe