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

Mateusz Kowalczyk fuuzetsu at fuuzetsu.co.uk
Mon Jan 27 12:32:04 UTC 2014


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....
> 
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
> 

You can still define your own mconcat and not use the default
definition. There's no case for this proposal from that aspect.

-- 
Mateusz K.


More information about the Libraries mailing list