Dynamically set -hide-all-packages is being ignored.
Consider the following two alternative ways of specifying dynflags:
./inplace/bin/ghc-stage2 --interactive -hide-all-packages -package base
GHCi, version 7.1.20101013: http://www.haskell.org/ghc/ :? for help
[...]
Prelude> import Control.Monad.State.Strict
<no location info>:
Could not find module `Control.Monad.State.Strict':
It is a member of the hidden package `monads-fd-0.1.0.2'.
It is a member of the hidden package `mtl-1.1.1.0'.
Use -v to see a list of the files searched for.
Now, instead of specifying the flags on startup we set them after startup:
./inplace/bin/ghc-stage2 --interactive
GHCi, version 7.1.20101013: http://www.haskell.org/ghc/ :? for help
[...]
Prelude> import Control.Monad.State.Strict
<no location info>:
Ambiguous module name `Control.Monad.State.Strict':
it was found in multiple packages: monads-fd-0.1.0.2 mtl-1.1.1.0
Prelude> :set -hide-all-packages
Prelude> import Control.Monad.State.Strict
<no location info>:
Ambiguous module name `Control.Monad.State.Strict':
it was found in multiple packages: monads-fd-0.1.0.2 mtl-1.1.1.0
The interactive call to :set -hide-all-packages is ignored. The same happens inside the GHC API (which is causing me problems).
You need to have both mtl and monads-fd installed to get the above error.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.13 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |