leftToMaybe/rightToMaybe
Herbert Valerio Riedel
hvr at gnu.org
Thu Aug 8 13:30:48 CEST 2013
On 2013-08-08 at 13:22:41 +0200, David Luposchainsky wrote:
> On 2013-08-08 13:09, Henning Thielemann wrote:
>> For me using the arrow functions as Data.Tuple and Data.Either utility
>> functions is abuse. Control.Arrow is meant to generalize (->). If you
>> call maybeLeft and MaybeRight this is certainly not your intention.
>
> That is precisely my point. The functionality is there, it's accessible,
> but due to meta-concerns (i.e. the "meaning of using these functions")
> they should not be used in a certain context. The syntax is sort of nice
> though, so maybe we should adopt that for Either/Tuple where applicable.
Btw, I have been wondering ever since I read[1] why Data.Tuple and
Data.Either doesn't provide all those useful combinators mentioned in
that paper for product and sum types.
[1] "Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire"
http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.41.125
More information about the Libraries
mailing list