[Haskell-cafe] ANN: monad-bool 0.1

Ertugrul Söylemez es at ertes.de
Wed Jan 23 04:13:42 CET 2013


Roman Cheplyaka <roma at ro-che.info> wrote:

> - what do you need unsafeCoerce for?

The unsafeCoerce is needed because the library is severely broken.
Consider this:

    do onlyIf False
       x <- c
       onlyIf True
       return x

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.

Also I'm quite sure that the monads don't have associative (>>) either.
Consider this:

    yes = onlyIf True
    no  = onlyIf False

    yes >> x >> no >> y

According to the intended semantics this should result in 'x', but what
does

    yes >> (x >> no) >> y

result in?


Greets,
Ertugrul

-- 
Not to be or to be and (not to be or to be and (not to be or to be and
(not to be or to be and ... that is the list monad.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130123/0f9509d8/attachment.pgp>


More information about the Haskell-Cafe mailing list