#5905: ghc with incorrect arguments deletes source file
------------------------------------------+---------------------------------
 Reporter:  dowski                        |          Owner:                  
     Type:  bug                           |         Status:  new             
 Priority:  normal                        |      Component:  Compiler        
  Version:  7.0.3                         |       Keywords:                  
       Os:  Linux                         |   Architecture:  Unknown/Multiple
  Failure:  Compile-time performance bug  |       Testcase:                  
Blockedby:                                |       Blocking:                  
  Related:                                |  
------------------------------------------+---------------------------------
 I'm just learning haskell and I mistakenly passed the -o argument to ghc
 instead of -c.  When combined with the -i argument (which I also
 mistakenly supplied, thinking of ghci), this unlinks the file named by -o.

 This is certainly a case of PEBKAC, but ghc should probably do something
 other than unlinking the file.

 {{{
 $ ghc --version
 The Glorious Glasgow Haskell Compilation System, version 7.0.3
 $ ls path/to/
 source.hs
 $ ghc -i . -o path/to/source.hs
 /usr/bin/ld: cannot find .: File format not recognized
 collect2: ld returned 1 exit status
 $ ls path/to/
 $
 }}}

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to