[Haskell] Types of when and unless in Control.Monad

Andreas Abel andreas.abel at ifi.lmu.de
Wed Jun 6 18:22:19 CEST 2012

On 06.06.2012 16:29, Peter Simons wrote:
> Henning Thielemann wrote:
>   >  The type of 'when' is not arbitrarily restrictive. It makes sure,
>   >  that no monadic result is ignored by accident.
> I completely agree with this point. If 'when' had a more relaxed type
> signature, then the combinator would be slightly more convenient to use,
> but it would also be more dangerous to use. Personally, I prefer to err
> on the side of caution. Besides, it's not my impression that 'when' is
> particularly inconvenient to use as it is now, especially since the
> introduction of 'void'.
> Just my 2 cents.

That seems to be the opinion of the majority of those who have answered 
to my proposal.  Which shall henceforth be considered



Andreas Abel  <><      Du bist der geliebte Mensch.

Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY

andreas.abel at ifi.lmu.de

More information about the Libraries mailing list