I encounter a strange situation in GHCI, don't know if anyone observed similar case. For some module, when I have it in the search path both by -package-conf
, and also by -i
, GHCI fails when I try to import the module with 'module is not loaded: FooModule'
.
:module
loads it fine however- or I can do
:load FooModule
,:m
to clear the import list, and thenimport FooModule
- or I can remove the path from
-i
and then it imports fine
Tracked this to be the otherwise -> modNotLoadedError m loc
case in GHC, where otherwise
~ modulePackageId = this_pkg
(the meaning of which I don't know).
This is not entirely systematic, there are some module which are both in package and source path, but can be imported.