[Haskell-cafe] ANN: monad-bool 0.1
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.
do onlyIf False
x <- c
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.
yes = onlyIf True
no = onlyIf False
yes >> x >> no >> y
According to the intended semantics this should result in 'x', but what
yes >> (x >> no) >> y
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...
Size: 836 bytes
Desc: not available
More information about the Haskell-Cafe