Proposal: Make Semigroup as a superclass of Monoid

Edward Kmett ekmett at gmail.com
Wed Apr 29 19:19:29 UTC 2015


On Wed, Apr 29, 2015 at 2:28 PM, Malcolm Wallace <malcolm.wallace at me.com>
wrote:

>
> Whilst the change itself might have merit, I have to say I'm getting
> really fed up of all these tiny and piecemeal change proposals for the
> Prelude.  I'd be much more in favour of something radical, like removing
> 80% of the Prelude altogether, and forcing people to import list operations
> from Data.List, monad stuff from Control.Monad, number hierarchies from
> Data.Numeric, etc.  Then we would not have to suffer all of these
> long-drawn-out and painful yet minor breakages in future.  With a minimal
> Prelude, all of the recent proposed changes, from Applicative/Monad, to
> Foldable/Traversable, to Semigroup/Monoid, could have been achieved purely
> via libraries, and if someone doesn't like a change, they can just pick a
> different library.
>

... and if they are exiled all the way into separate libraries then
nobodies code works together, because nobody wants to incur a dependency
they don't need at the moment.

For example, stuff in the containers package implement the classes in base,
but I'd wager pretty heavily that I'd have a hard time convincing Johan or
Milan to pick up _any_ dependency they absolutely didn't have to have to
make that library go.

As messy and organic as it is having a shared base to build on it gives us
a common names and instances for things we all have in common.

It may have been better to start with the culture you suggest. It would
have reduced this particular pain point, but the knock-on consequences of
such a design are pretty terrible.

So we're left with the choice of nickel and diming you with small changes
that you can work around with nice warning periods as you get hit by them
or making bigger changes that require harder actions. =/

-Edward
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20150429/778c5651/attachment.html>


More information about the Libraries mailing list