
(removing some CCs)
"S. Alexander Jacobson"
Simon,
The -hide-all-packages option would make sense only if there were real flexibility in selecting which packages to use in implementing the modules imported into your program.
I disagree. The basic system will be: - the users add build-depends to their .cabal files - their software, is built (by cabal) with the -hide-all-packages, and cabal adds -package flag for each explicit dependency, so: - if there is any dependency on a package not mentioned in the .cabal file, the program will fail to build with cabal. - (Previously[1], the user could fail to mention dependencies for "exposed" packages and not get an error.) So the -hide-all-packages makes a great deal of sense and provides value. I don't think that your characterization of it is constructive. It works with the packaging system that exists today in GHC. Most of the infrastructure is outside of the compiler[2]. There are pros and cons to that, but that's the reality of every compiler I know of. peace, isaac [1] That is, currently. [2] The "packaging system" bits that include cabal, hackage, and ghc-pkg are all external to the compiler. The compiler only does the relatively small job of knowing how to find the modules when given a -package flag (or when a package is exposed).