strictly matching monadic let and overloaded Bool (was: Are patternguards obsolete?)

Claus Reinke claus.reinke at
Thu Dec 14 06:38:29 EST 2006

> one issue arising in practice is that we would like to have
>    fromBool  :: MonadPlus m => Bool -> m a
> but the current definition of guard would fix the type to
>    fromBool  :: MonadPlus m => Bool -> m ()
> which would require type annotations for Booleans used as guards. see the
> attached example for an easy workaround.

what attachment, you ask? sorry, lack of sleep - now attached to this message.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Boolean.hs
Type: application/octet-stream
Size: 794 bytes
Desc: not available
Url :

More information about the Haskell-prime mailing list