Skip to content

(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 module Foo.Bar that imports Foo.Baz.
  • Create file Foo\Baz.hs containing a module Foo.Baz.
  • Double-click on Foo\Bar.hs; GHCi whines that it can't find Foo.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.

Edited by Ian Lynagh -
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information