[GHC] #9930: By default, a source code without extension would get overwritten by executable on *nix

GHC ghc-devs at haskell.org
Sun Feb 1 22:35:59 UTC 2015


#9930: By default, a source code without extension would get overwritten by
executable on *nix
-------------------------------------+-------------------------------------
        Reporter:  Rufflewind        |                   Owner:  Rufflewind
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.8.4
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Other             |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by Rufflewind):

 Replying to [comment:3 rwbarton]:
 > I would suggest that `-o` be required when the source filename does not
 have the expected file extension for its language (as specified by `-x`).

 I was thinking of failing with an error only if `-o` is not provided and
 the input and output filenames would coincide.  It's a bit less
 restrictive than your suggestion and should cover the typical cases where
 this occurs.  What do you think?

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9930#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list