[GHC] #7038: hidir/odir flags mixup modules

GHC cvs-ghc at haskell.org
Sat Jun 30 18:47:10 CEST 2012


#7038: hidir/odir flags mixup modules
--------------------------+-------------------------------------------------
 Reporter:  br1           |          Owner:                
     Type:  bug           |         Status:  new           
 Priority:  normal        |      Component:  Compiler      
  Version:  7.5           |       Keywords:                
       Os:  MacOS X       |   Architecture:  x86_64 (amd64)
  Failure:  None/Unknown  |       Testcase:                
Blockedby:                |       Blocking:                
  Related:                |  
--------------------------+-------------------------------------------------
 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

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7038>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the Glasgow-haskell-bugs mailing list