[Proposal] Add default implementation of mappend/mempty in terms of mconcat

Andreas Abel andreas.abel at ifi.lmu.de
Mon Jan 27 14:56:57 UTC 2014

+1 for the original proposal.

These are valid default implementations.  Nothing more to say.

On 27.01.2014 14:29, Tom Ellis wrote:
> On Mon, Jan 27, 2014 at 12:32:04PM +0000, Mateusz Kowalczyk wrote:
>> On 27/01/14 12:26, Henning Thielemann wrote:
>>> Am 27.01.2014 13:23, schrieb Joachim Breitner:
>>>> Hi,
>>>> Am Montag, den 27.01.2014, 11:42 +0100 schrieb Sjoerd Visscher:
>>>>> This seems rather pointless; I’m having trouble coming up with an
>>>>> example where mconcat would be easier or more elegant to implement. Do
>>>>> you have an example?
>>>> maybe cases where you implement mconcat for performance reasons anyways
>>>> (but are there good examples for that?),
>>> I think it is useful to define a custom mconcat in cases where it
>>> matters whether it is a left or a right fold.
>>>   > and then you don’t want to be bothered with the simple cases....
>> You can still define your own mconcat and not use the default
>> definition. There's no case for this proposal from that aspect.
> Sure, but if you are going to define your own mconcat for performance
> reasons, it would then be nice not to *have to* define your own mappend, or
> mempty.
> Tom
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries

Andreas Abel  <><      Du bist der geliebte Mensch.

Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY

andreas.abel at ifi.lmu.de

More information about the Libraries mailing list