On 3 November 2011 14:56, Ryan Newton <rrnew...@gmail.com> wrote: >> Aside: The problem with collections is that we don't have the programming >> language means to do this well yet (although soon!). The issue is that we >> want to declare a type class where the context of the methods depends on the >> instance e.g. >> class MapLike m where >> type Ctx :: Context -- Can't do this today! >> insert Ctx => k -> v -> m -> m >> Java et all cheats in their container hierarchy by doing unsafe casts (i.e. >> they never solved this problem)! > > Ah, interesting. Is there a proposal to do this?
Even better: it's already implemented by Max Bolingbroke and will be in ghc-7.4! See: http://hackage.haskell.org/trac/ghc/wiki/Status/Oct11 So be patient and wait for your Christmas present ;-) Bas _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe