Minor containers API changes

Edward Kmett ekmett at gmail.com
Wed Nov 30 06:48:56 CET 2011


Another issue is that containers tries to remain with a public API that is very close to Haskell 98/2011 for portability.

Sent from my iPad

On Nov 28, 2011, at 10:09 PM, Johan Tibell <johan.tibell at gmail.com> wrote:

> On Mon, Nov 28, 2011 at 5:29 PM, Kazu Yamamoto <kazu at iij.ad.jp> wrote:
>> Hello,
>> 
>> This is off-topic but I'm curious.
>> 
>> Why the container package does not provide a type-class to unify APIs?
>> Are there any technical/historical reasons?
> 
> Mostly technical I would say. I hope we should be able to do this
> right now when we have constraint kinds [1] i.e. we can do something
> like:
> 
> class Map m where
>    type C :: Constraints
>    insert :: C => k -> v -> Map k v -> Map k v
> 
> instance Map HashMap where
>    type C = Ord
>    insert = ...
> 
> 1. http://blog.omega-prime.co.uk/?p=127
> 
> -- Johan
> 
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries



More information about the Libraries mailing list