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

GHC ghc-devs at haskell.org
Fri Jul 17 12:07:26 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 svenpanne):

 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: Apart
 from being agnostic about the project root, this way you don't have a clue
 about which additional packages are needed and must be specified on the
 commandline, too. Furthermore, you might need to enable some GHC
 extensions, define some preprocessor symbols etc. This is exactly what
 .cabal files are for and why they are declarative, and any non-toy tool
 should use these as a basis.

 This situation is not much different from other language
 environments/IDEs, which all have some kind of "project file" (under
 varying names). Linting Java without setting the right CLASSPATH? No
 way... Linting C/C++ without setting the right include search paths and
 preprocessor symbols? No way...

 Perhaps you might want to have a look at the haskell-mode for Emacs, it
 does exactly what you want in a saner way, i.e. by looking at a potential
 .cabal file.

 Before I sound even more like Grumpy Cat on a really bad day, I'd like to
 hear from others what they think about this proposal. ;-)

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


More information about the ghc-tickets mailing list