Proposal: Add concatMapM function (#2042)
lemming at henning-thielemann.de
Tue Jan 15 10:01:02 EST 2008
On Tue, 15 Jan 2008, Neil Mitchell wrote:
> > Yes. But you still need to put the new functions in the
> > right place in the module hierarchy. How do we do that?
> You create a package extras. You do import Control.Monad.Extras in
> your package, rather than import Control.Monad. The extra's package
> wraps up all the CPP magic required to keep track of the additions to
> the base libraries, so you end up using concatMapM from Control.Monad
> if it is in your libraries, you use one from extras if its not.
I don't like fixing bad style (import anonymously and unqualified) by even
more bad style (CPP). The problem can nicely be solved by letting GHC emit
warnings if you don't import carefully, and allow lazy importing style in
Haskell Prime only as language extension. :-)
More information about the Libraries