On 17/03/2010, at 03:16, Louis Wasserman wrote:

> I'm not willing to do this sort of typeclass wrapper thing, primarily because 
> nothing else in containers does -- even though we might have a Mapping type 
> class that handles both IntMap and Map, we don't.
> 
> I'm inclined to let that design choice stand, as far as containers is 
> concerned.  It would make perfect sense to write a new package with such a 
> type class and offering instances for the containers priority queue 
> implementations, but I prefer to stick with the style that containers already 
> seems to use -- that is, exporting separate modules without a unifying type 
> class, but with nearly-identical method signatures.

FWIW, vector does both. It defines most vector operations generically and then 
exports appropriate specialisations for each concrete vector type. I think this 
is the most flexible and convenient approach. I just wish Haskell had some kind 
of support for it.

Roman


_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to