[Haskell-cafe] instance Alternative (Either [a])

John Meacham john at repetae.net
Thu May 22 09:35:21 UTC 2014


On Thu, May 22, 2014 at 12:21 AM, Tony Morris <tonymorris at gmail.com> wrote:
> On 22/05/14 14:28, John Meacham wrote:
>> Notably, <*> and `ap` have very different meanings for this which is
>> not true for other monads.
> Please don't do this. Kittens die and all that.


In my particular case I did this, it is actually collecting a
non-deterministic set of values so the difference between the two does
not matter for correctness, but is practically useful to have a
greater set of errors to choose from. The difference is hidden behind
an abstract interface so it actually is externally a monad. Manual
imprecise exceptions.

I just prefer to think of `ap` as buggy and unrelated to <*> sometimes...

   John

-- 
John Meacham - http://notanumber.net/


More information about the Haskell-Cafe mailing list