Skip to content

"module main:Foo is not loaded" when trying to load a module from a user package in ghci

When installing a cabal package as a user, loading a module from the package in ghci fails; it looks like it's got the package wrong.

$ ghc --make Setup
[...]
$ ./Setup configure --prefix=/tmp/foo
[...]
$ ./Setup build
[...]
$ ./Setup install --user
[...]
$ ghci
[...]
Prelude> :m + Foo
module main:Foo is not loaded
Trac metadata
Trac field Value
Version 6.6
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information