id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
3104,"-main-is should be a link time option, not compile time",NeilMitchell,,"The {{{-main-is}}} flag specifies which function name to use as main. However, when doing separate compilation:

{{{
ghc -c Foo.hs
ghc Foo.o
}}}

You have to give the {{{-main-is}}} in the first step - the compilation, rather than in the second step, the linking. It feels like this flag should be a link time option, and would give greater flexibility allowing one object file to be used in multiple projects with different main commands.

If you compile with {{{ghc --make}}} this issue isn't really a problem.",bug,closed,normal,7.4.1,Compiler,6.10.1,wontfix,,ndmitchell@…,Unknown/Multiple,Unknown/Multiple,None/Unknown,Unknown,,,,
