String != [Char]

Edward Kmett ekmett at gmail.com
Fri Mar 23 22:00:48 CET 2012


On Fri, Mar 23, 2012 at 4:21 PM, Nate Soares <nate at so8r.es> wrote:

> Note that this might be a good time to consider re-factoring the list
> operations, for example, making ++ operate on monoids instead of just
> lists.


Note: we have (<>) for Monoid, which was deliberately chosen rather than
generalizing (++) because that had already changed meaning from applying to
MonadPlus to the more restricted type during what I tend to refer to as the
"great momomorphization revolution of 1998", and not every MonadPlus is
compatible with the corresponding monoid (Maybe comes to mind).

This also entails moving Data.Monoid into the standard.


> I think the 'naming issue' that you mention highlights the need for better
> use of type classes in the prelude.


The major issue with typeclasses for things like special-purpose containers
is that they almost inevitably wind up requiring multiparameter type
classes with functional dependencies, or they need type families. This then
runs afoul of the fact that since neither one is better than the other for
all usecases, neither one seems to be drifting any closer to
standardization.

-Edward
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-prime/attachments/20120323/564b5bf3/attachment.htm>


More information about the Haskell-prime mailing list