
#720: Executables fail on windows if the executable name has a dot in it ----------------------------+----------------------------------------------- Reporter: j3h | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ----------------------------+----------------------------------------------- Comment(by duncan): Currently the code does: {{{ -- exeNameReal, the name that GHC really uses (with .exe on Windows) let exeNameReal = exeName' <.> (if null $ takeExtension exeName' then exeExtension else "") }}} Where as I would expect it should be simply {{{ -- exeNameReal, the name that GHC really uses (with .exe on Windows) let exeNameReal = exeName' <.> exeExtension }}} since `p <.> "" = p`. It is not clear to me why the code is like it is now. The code was added by the patch {{{ Mon Aug 21 15:30:21 BST 2006 Neil Mitchell * Make -o use the filename as GHC will, i.e. with .exe on the end for Windows. This fixes a GHC 6.4.2 bug with relinking every time. }}} the code was {{{ -- exeNameReal, the name that GHC really uses (with .exe on Windows) let exeNameReal = exeName' `joinFileExt` (if null $ snd $ splitFileExt exeName' then exeExtension else "") }}} Previously it had relied on ghc adding the .exe extension. It is still not obvious why it is coded the way it is, if it's an oversight or something I'm missing. In principle the above allows people to make an executable that does not use the .exe extension. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/720#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects