[Haskell-cafe] Maybe to Either -- is there a better way?

Alexander Dunlap alexander.dunlap at gmail.com
Wed Aug 4 12:40:39 EDT 2010


On Wed, Aug 4, 2010 at 9:21 AM, Henning Thielemann
<schlepptop at henning-thielemann.de> wrote:
> Ivan Lazar Miljenovic schrieb:
>> Yitzchak Gale <gale at sefer.org> writes:
>
>>> While useful, I think its ubiquity to simplicity ratio is not
>>> high enough to justify either depending on MissingH
>>> just for that, or adding it to a base library.
>>
>> Just like the swap :: (a,b) -> (b,a) function a lot of people were
>> discussing on libraries@?
>
> I have 'swap' in my utility-ht.
>
>> In general, I agree.
>
> Problem in Haskell is, that it allows for a high degree of
> modularization such that most components become trivial. Does that mean
> that we should not define simple functions at all, which in the extreme
> case would mean that we inline all potential function calls?
>

It's also nice for people reading code if common functions are
functions from common libraries. This allows readers' "vocabulary" of
common functions to increase, so they don't have to trawl through
someone's personal "utility" library to figure out what each utility
function does.

Alex


More information about the Haskell-Cafe mailing list