-i option requires named module
I have the following layout:
./Foo.hs
./test/Bar.hs
both empty files.
I can run ghci successfully as follows:
>ghci Foo
>ghci test/Bar
>ghci -itest Foo
but
>ghci -itest Bar
File name does not match module name:
Saw: ‘Main’
Expected: ‘Bar’
The same problem occurs when ghci is replaced with ghc.
Basically, ghc/ghci is forcing modules found via -i to have a named module in them. My understanding is that ghci -itest Bar is equivalent to ghci test/Bar, so the behavior should be the same as well.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.10.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |