(Windows?) GHCi doesn't load hierachical modules
On Windows, if you double-click a *.hs
file, GHCi starts up and loads the corresponding module. Usually this works fine, however... it seems to trip over on hierachical module names. Specifically:
- Create file
Foo\Bar.hs
containing a moduleFoo.Bar
that importsFoo.Baz
. - Create file
Foo\Baz.hs
containing a moduleFoo.Baz
. - Double-click on
Foo\Bar.hs
; GHCi whines that it can't findFoo.Baz
in the search path.
This happens regardless of whether either of the modules is compiled or not. An easy work-around is to invoke GHCi from the command prompt with the CWD below the Foo
folder. But it's kind of tedious to have to do that.
Note that if Foo.Bar
doesn't import anything (or only modules from packages) then it works just fine. GHCi just doesn't seem to be able to find source files in the current folder if they have hierachical names.