Proposal: Add concatMapM function (#2042)

Yitzchak Gale gale at sefer.org
Tue Jan 15 09:17:54 EST 2008


Hi Bulat,

I wrote:
>> I import only the functions I need from libraries that I don't
>> own myself to minimize that effect.

Bulat Ziganshin wrote:
> i think that the better way will be to put all these functions into
> extralibs bundled with ghc. this will allow me to control which
> concrete version of lib i import and therefore which set of functions
> i've used.

Yes. But you still need to put the new functions in the
right place in the module hierarchy. How do we do that?

For each module included in the bootlibs, would
you have also Path.To.Module.Extra? That would
be annoying. And it wouldn't even solve the problem:
if you use Extra even once, you would go back
to the same situation.

Or maybe this: have two parallel streams of package versions
in Cabal, with one from each installed at any given time.
If you compile with -package foo_extra_1.2, that replaces
all of the modules in foo_bootlib or foo_extra_<any other version>.
But now you always need to have all versions of
every package installed on your system at any time --
no, *two versions* of all versions of every package.
Yuck.

There has to be some reasonable mechanism of adding
new features to the libraries, even if we try very hard to be
very disciplined and use it only rarely.

> i don't like idea of editing my module imports each time i
> use new functions

It is a little more work. And there is the lint problem.
But I find it's worth it.

Sometimes I'm lazy and just do import Library.Module
without an import list. I'm almost always sorry
later on.

Regards,
Yitz


More information about the Libraries mailing list