[ ghc-Bugs-996746 ] -odir changes output name of main module
SourceForge.net
noreply at sourceforge.net
Mon Jul 26 07:29:26 EDT 2004
Bugs item #996746, was opened at 2004-07-23 18:34
Message generated for change (Comment added) made by simonmar
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=996746&group_id=8032
Category: Compiler
Group: 6.2.1
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Martin Sjögren (msjogren)
Assigned to: Nobody/Anonymous (nobody)
Summary: -odir changes output name of main module
Initial Comment:
When the main module is not named Main.hs, ghc -c
Foo.hs normally creates Foo.hi and Foo.o, but if you
add an -odir flag, ghc will instead produce Foo.hi and
Main.o. This seriously breaks building multiple
executables from the same files but with different main
modules.
----------------------------------------------------------------------
>Comment By: Simon Marlow (simonmar)
Date: 2004-07-26 11:29
Message:
Logged In: YES
user_id=48280
I think you mean "ghc will instead produce Main.hi and Main.o".
This is deliberate, and has been discussed before on the
mailing list. The behaviour is clearly documented in the
manual.
The problem with changing the behaviour is that there isn't
a good general rule we could apply. If you want the .hi
file to follow the source filename instead of the module
name with -odir, what rule should you use to derive the .hi
filenname? (remember to consider hirerachical module names,
and how GHC should find the interface again when another
module imports it).
Please follow up to the mailing list, I'm closing this bug.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=996746&group_id=8032
More information about the Glasgow-haskell-bugs
mailing list