
It also gives the advantage that modules can be moved in the hierarchy (by a command-line flag or whatever) specifically to support whatever a particular program happens to require.
Would the following be possible under your proposal:
module M1.A imports Collections.Foo and only works with version 1 module M2.B imports Collections.Foo and only works with version 2 module C imports M1.A and M2.B
Could we compile/use M1.A with Graphics.UI mapped to Graphics.UI.v1 and M2.B with Graphics.UI mapped to Graphics.UI.v2 and then correctly compile module C?
Yes, absolutely. There are issues about exactly what the programmer would have to do to make this happen: under the story I had in mind you would have to fiddle with a user-local package.conf file to change the mapping. Perhaps command-line flags could be added to make this more convenient, though. Cheers, Simon