[GHC] #3140: (Windows?) GHCi doesn't load hierachical modules

GHC trac at galois.com
Sat May 23 15:44:10 EDT 2009


#3140: (Windows?) GHCi doesn't load hierachical modules
-----------------------+----------------------------------------------------
    Reporter:  Orphi   |        Owner:         
        Type:  bug     |       Status:  new    
    Priority:  normal  |    Milestone:         
   Component:  GHCi    |      Version:  6.10.1 
    Severity:  normal  |   Resolution:         
    Keywords:          |   Difficulty:  Unknown
    Testcase:          |           Os:  Windows
Architecture:  x86     |  
-----------------------+----------------------------------------------------
Changes (by igloo):

  * difficulty:  => Unknown

Old description:

> 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.

New description:

 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.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3140#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list