On Fri, Mar 23, 2012 at 4:21 PM, Nate Soares <n...@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
_______________________________________________ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org/mailman/listinfo/haskell-prime