[GHC] #10643: GHC cannot import submodules when run from subfolder

GHC ghc-devs at haskell.org
Wed Jul 15 14:37:36 UTC 2015


#10643: GHC cannot import submodules when run from subfolder
-------------------------------------+-------------------------------------
        Reporter:  FPtje             |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.10.1
      Resolution:                    |                Keywords:  subfolder
Operating System:  Unknown/Multiple  |  import submodule cd
 Type of failure:  GHC rejects       |            Architecture:
  valid program                      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by FPtje):

 {{{
 falco ~/Downloads/Yes$ mkdir Yes
 falco ~/Downloads/Yes$ mv B.hs Yes/

 falco ~/Downloads$ find Yes
 Yes
 Yes/Yes
 Yes/Yes/B.hs
 Yes/A.hs


 falco ~/Downloads/Yes$ ghci A.hs
 GHCi, version 7.10.1: http://www.haskell.org/ghc/  :? for help
 [1 of 2] Compiling Yes.B            ( Yes/B.hs, interpreted )
 [2 of 2] Compiling Yes.A            ( A.hs, interpreted )
 Ok, modules loaded: Yes.A, Yes.B.
 }}}

 Yes, like I said, it looks for Yes/Yes/B.hs. Puting B.hs in Yes/Yes will
 make ghc work with loading A.hs from Yes/, but that will break running ghc
 in the root of the source:

 {{{
 falco ~/Downloads/Yes$ cd ..
 falco ~/Downloads$ ghci Yes/A.hs
 GHCi, version 7.10.1: http://www.haskell.org/ghc/  :? for help

 Yes/A.hs:3:8:
     Could not find module ‘Yes.B’
     Use -v to see a list of the files searched for.
 Failed, modules loaded: none.
 Prelude>
 }}}

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


More information about the ghc-tickets mailing list