[Haskell-cafe] Why the Prelude must die

Benja Fallenstein benja.fallenstein at gmail.com
Sun Mar 25 11:00:47 EDT 2007


(new here)

2007/3/25, Jacques Carette <carette at mcmaster.ca>:
> Some classes would become even more important: monoid, groupoid,
> semi-group, loop (semi-group with identity), etc.  But all of those are,
> to the average programmer (and many a mathematician), just as scary as
> Monad.

Of course, when you get that general, you start having the problem
that many types can be made into these structures in more than one
way. Even the current Monoid class has that problem, even though it
has some ties to a particular application (the Writer monad and stuff
similar to it -- as reflected in the 'mappend' and 'mconcat' names).

You can have newtype wrappers, but that's at least somewhat annoying :-)

I'd like to see these classes in the standard library, but I'm not
sure at this point whether they are useful enough to have in the
prelude, as long as they're not at least losely to a specific
application (Field -> numbers; Monoid -> collecting results; Monad ->
imperative computations).

- Benja

More information about the Haskell-Cafe mailing list