[GHC] #3104: -main-is should be a link time option, not compile time
GHC
trac at galois.com
Mon Mar 16 11:51:47 EDT 2009
#3104: -main-is should be a link time option, not compile time
-----------------------------+----------------------------------------------
Reporter: NeilMitchell | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.10.1 | Severity: normal
Keywords: | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
-----------------------------+----------------------------------------------
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.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3104>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list