hidir/odir flags mixup modules
When using hidir and odir ghc flags, "ghc -- make" creates Main.hs and Main.o no matter the name of the input file. Later compiling a different file picks up the old Main.o. This reproduces the issue:
echo "main = putStrLn \"1\"" > main1.hs echo "main = putStrLn \"2\"" > main2.hs ghc --make main1.hs -odir dir -hidir dir ghc --make main2.hs -odir dir -hidir dir
- /main1
- /main2
The output is
[1 of 1] Compiling Main ( main1.hs, dir/Main.o ) Linking main1 ... Linking main2 ... 1 1
Trac metadata
Trac field | Value |
---|---|
Version | 7.5 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |