#2248: .exe extension missing when compiling a file ending in dot + digits + dot
hs
----------------------+-----------------------------------------------------
 Reporter:  oboudry   |          Owner:             
     Type:  bug       |         Status:  reopened   
 Priority:  normal    |      Milestone:  6.10 branch
Component:  Compiler  |        Version:  6.8.2      
 Severity:  minor     |     Resolution:             
 Keywords:            |     Difficulty:  Unknown    
 Testcase:            |   Architecture:  x86        
       Os:  Windows   |  
----------------------+-----------------------------------------------------
Changes (by NeilMitchell):

  * status:  closed => reopened
 * cc: [EMAIL PROTECTED] (added)
  * resolution:  invalid =>

Comment:

 The executable extensions are given by the environment variable %PATHEXT%.
 On Vista:

 PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

 I'm not entirely convinced GHC is doing the right thing here though. I
 think there are two entirely separate cases which are being treated
 equivalently:

 1) Not specifying -o. ghc --make <name>.hs should create "<name>.exe".
 Even ghc --make Main.exe.hs should create Main.exe.exe. This fixes this
 bug in a clean way, without knowledge of which extensions are executable.

 2) Specifying -o. ghc -o <name> should create <name>.exe unless name
 already has an extension. i.e. -o foo.123 produces foo.123, but -o foo
 produces foo.exe. This maintains existing behaviour.

 I suspect this is being implemented as ghc --make <name>.hs is translated
 to ghc --make <name>.hs -o <name>, which is merging the behaviour of the
 two cases, and getting the first case (in this bug) wrong.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2248#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to