[GHC] #10987: -i option requires named module

GHC ghc-devs at haskell.org
Mon Oct 19 01:51:29 UTC 2015


#10987: -i option requires named module
-------------------------------------+-------------------------------------
           Reporter:  crockeea       |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  7.10.2
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 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.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10987>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list