Proposal: add ifM and whenM to Control.Monad

Simon Hengel sol at typeful.net
Tue Apr 22 08:32:24 UTC 2014


>  [2]: Ironically, the easiest way to fix packages (w/o breaking compat for
>       base<4.7.1) would be to simply make sure the new
>       ifM/whenM functions are not imported, and that the package-local
>       hand-rolled versions of ifM/whenM are continued to be used...

Now that I'm finally confident about the approach we take for
base-compat[1] (thanks to João Cristóvão for code and discussion), I
want to give it more love in the future.

I can add them to Control.Monad.Compat as soon as they are committed
upstream and re-export the upstream versions for base > 4.7.0.  That way
people who are willing to depend on base-compat can just import
Control.Monad.Compat.

Cheers,
Simon

[1] http://hackage.haskell.org/package/base-compat


More information about the Libraries mailing list