simonmar at microsoft.com
Thu Jul 5 09:08:52 EDT 2001
> I doubt how it is fixed because do not understand how do you treat
> For any occasion, I add that the directories are
> D/export/ -- contains .hi files, .o, .a libraries
> D/source/ -- contains Permut.hs and other modules
> D/source/demotest/ -- contains other modules
> The docon package refers to D/export/
> Permut.hi resides in D/export/ only.
> ghci ... -package docon
> is run in D/source/demotest/ - and it works,
> then, in D/source/ - and it reports
> ... failed to load interface for `Permut': ...
> I do not understand why you say
> > ... your current directory is the same as a package directory ...
> The current directory is D/source/
> and a package directory is D/export/ (?)
> Aslo Permut.hi resides in D/export/ only.
> I suspect that we are confusing things, are we?
But Permut.hs resides in D/source/, the current directory, so GHCi is
picking it up as a "home module" (a home module is one that isn't in a
package). Home modules may only be used if they have previously been
loaded via :load, hence the error message stating that Permut has not
When I said "your current directory is the same as a package directory",
in your case I should really have said "a module in the current
directory shadows one in a package directory", which isn't allowed.
The change I made was to ignore home modules when looking for an
interface to load: this way you always get the Permut module from the
package directory. You can probably still confuse GHCi with ":load
More information about the Glasgow-haskell-bugs