Ticket #146 (closed bug: Fixed)

Opened 10 years ago

Last modified 43 years ago

ghc --make deletes source file in Windows

Reported by: nobody Owned by: nobody
Priority: normal Milestone:
Component: Compiler Version: 6.0
Keywords: Cc:
Operating System: Architecture:
Type of failure: Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I’ve a very strange problem that may be related to my 
computer. 

If I compile a file with ghc -–make from outside the 
directory where the source file is, using \ as the path 
separator, the file gets deleted. (Using Windows 2000 
and GHC 6.0)

For example:

F:\>cat > project\test.hs
module Main where
main = putStrLn "Hello"

F:\>ghc --make project/test.hs
Chasing modules from: project/test.hs
Compiling Main             ( project/test.hs, 
project/test.o )
Linking ...

F:\>ghc --make project\test.hs
Chasing modules from: project\test.hs
Skipping  Main             ( project/test.hs, project/test.o )
Linking ...

F:\>ghc --make project\test.hs
Chasing modules from: project\test.hs
ghc: can't find file `project\test.hs'

And indeed the file is no longer there!

Change History

Changed 10 years ago by simonpj

  • status changed from assigned to closed
Logged In: YES 
user_id=50165

Fixed by Sigbjorn, by normalising command-line argument path 
names.

Note: See TracTickets for help on using tickets.