[Haskell-cafe] ANN: monad-bool 0.1

John Wiegley johnw at fpcomplete.com
Wed Jan 23 07:03:47 CET 2013


>>>>> Ertugrul Söylemez <es at ertes.de> writes:

> There is a good reason why Haskell's type system would never have allowed to
> write this library.  I recommend the author to try again without
> unsafeCoerce.  It won't work.

You are right, and in fact what I wanted to do cannot be done.  It requires
distinguishing the final value as either a Left (result from short-circuiting)
or a Right (final value).  And EitherT can already do that, it just lacks a
convenience function to make it easier (i.e, not having to write lots of
nested if statements).

-- 
John Wiegley
FP Complete                         Haskell tools, training and consulting
http://fpcomplete.com               johnw on #haskell/irc.freenode.net



More information about the Haskell-Cafe mailing list