[GHC] #1125: "module main:Foo is not loaded" when trying to
load a module from a user package in ghci
GHC
trac at galois.com
Thu Feb 1 07:49:42 EST 2007
#1125: "module main:Foo is not loaded" when trying to load a module from a user
package in ghci
----------------------+-----------------------------------------------------
Reporter: igloo | Owner:
Type: bug | Status: closed
Priority: normal | Milestone: 6.6.1
Component: Compiler | Version: 6.6
Severity: normal | Resolution: invalid
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Unknown |
----------------------+-----------------------------------------------------
Changes (by simonmar):
* resolution: => invalid
* status: new => closed
Comment:
This isn't a bug. It works like this:
* You have built and installed a package "p", containing module `Foo`.
* You start up GHCi and ask it to add module `Foo` to the context,
you expect to get `p:Foo`.
* GHCi finds the file `Foo.hs` in the current directory. It assumes
that this contains module `Foo` from the `main` package: `main:Foo`.
Modules from the `main` package take precedence over package modules
for the purposes of `import` and `:module`.
* Since you haven't loaded `main:Foo` in your current GHCi session,
GHCi emits an error to that effect.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1125>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list