Opened 11 years ago

Closed 10 years ago

Last modified 46 years ago

#321 closed bug (Fixed)

"ghc -M" complains about multiply-defined "Main" modules

Reported by: ashley-y Owned by: simonpj
Priority: normal Milestone:
Component: Compiler Version: 6.4
Keywords: Cc:
Operating System: Architecture:
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


I'm trying to create dependencies for my Makefile using "ghc -M". 
The files I give it include several main program modules. GHC 

module `Main' is defined in multiple files: Investigation/

This problem didn't happen with 6.2.2.

Change History (3)

comment:1 Changed 10 years ago by magunter

Logged In: YES 

Fixing this is a high priority for me.  I was working around
it by using
6.2.2 to generate dependencies.  Now that I'm using a
library not in 6.2,
that workaround fails.

comment:2 Changed 10 years ago by simonpj

Logged In: YES 

Ian Lynagh adds 

This is annoying for a couple of reasons: it means I have to 
list all
the executables in my Makefile twice (once for the rules, 
once for a
"include .depend.Foo"), and it means that each change to a 
shared module
has to regenerate the dependency files for all executables, 
which takes
noticably longer.

comment:3 Changed 10 years ago by simonpj

  • Status changed from assigned to closed
Logged In: YES 

I've fixed this so ghc -M works even if there are multiple 
modules with the same name, provide you don't import them.

Both in the HEAD and the STABLE branch, so it'll be in 6.4.1

Note: See TracTickets for help on using tickets.