Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 5.5k
    • Issues 5.5k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 637
    • Merge requests 637
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #146
Closed
Open
Issue created Jun 09, 2003 by nobody@trac-nobody

ghc --make deletes source file in Windows

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!
Trac metadata
Trac field Value
Version 6.0
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution ResolvedFixed
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking