[Haskell-cafe] container-classes

wren ng thornton wren at freegeek.org
Mon Sep 6 23:53:28 EDT 2010

On 9/6/10 11:46 PM, Ivan Lazar Miljenovic wrote:
> Well, my current work is to implement restricted versions of the
> various type classes (I'm undecided if they should be split off into a
> separate package or not) and then have the Data.Containers module
> basically define type aliases (which will probably still use Monoid
> though, since the vast majority of containers are able to be empty).
> [...]
> Hmmm, splitting up Monoid might make sense.  I'll have a think about
> that (I was going to just keep Monoid as is since no constraints are
> needed.

Bear in mind that splitting up Monoid also means you can define a(n 
additive) Semigroup class for non-nullable types. I think that's a step 
in the right direction since it lets you include common 'exotic' 
collections like non-empty lists.

Live well,

More information about the Haskell-Cafe mailing list