On Fri, Sep 14, 2012 at 9:08 PM, Andrew Pennebaker <
andrew.penneba...@gmail.com> wrote:

> Given that Maybe and Either don't modify state, nor do they communicate
>> with outside interfaces, nor do they specify computation ordering, I don't
>> understand why they're implemented as monads. Why not a primitive typeclass
>> or even datatype declaration?
>
>
They're not used in their monadic guise as often as they should be, IMO.
 Either String has for a while been an "error monad" (more commonly,
EitherT String as ErrorT) but has annoying shortcomings --- but they're an
obvious mechanism for reporting and tracking / short-circuiting failure in
computations (carrying a failure reason in the case of Either).

-- 
brandon s allbery                                      allber...@gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to