[GHC] #10643: GHC cannot import submodules when run from subfolder
GHC
ghc-devs at haskell.org
Fri Jul 17 14:30:17 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):
> Simply trying to run "ghc -Wall" (plus a few warning/error-related
flags) is just way to naive to be helpful for any non-toy program
Nonsense! ''ghc -Wall'' works fine when this issue is fixed/worked around!
http://i.imgur.com/CxHO2S5.png
Besides, even if there are ''other'' hurdles that would make ghc -Wall not
work for single files in bigger projects, that does not mean that this
issue should not be resolved.
> [...] other language environments/IDEs
> [...] haskell-mode for Emacs, it does exactly what you want in a saner
way
At the risk of sounding even grumpier, the core of this issue lies with
ghc not finding modules that it arguably should. Therefore, the
responsibility lies with ghc to solve it. You can tell me to use emacs and
you can tell me that IDE's for other languages need more information
before they can lint code, but that won't make the problem go away for
ghc.
The proposed fix isn't that difficult, makes proper sense given how the
folder structure vs. module name works and should (AFAIK) not break any
backwards compatibility. I don't see why you would want to throw this away
at face value before expecting everyone who uses runhaskell, ghci and ghc
to just work around it while stating "that's how IDEs/haskell linters do
it".
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10643#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list