Repository : ssh://darcs.haskell.org//srv/darcs/hsc2hs

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/095ee315b68267222d2b0da051fdd07f0e9e6838

>---------------------------------------------------------------

commit 095ee315b68267222d2b0da051fdd07f0e9e6838
Author: Ian Lynagh <[email protected]>
Date:   Thu Mar 15 16:45:33 2012 +0000

    Fix for Win64

>---------------------------------------------------------------

 Main.hs |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/Main.hs b/Main.hs
index ba516d4..689997b 100644
--- a/Main.hs
+++ b/Main.hs
@@ -170,16 +170,17 @@ findCompiler mb_libdir config
                       Nothing ->
                           die ("Can't find "++default_compiler++"\n")
                       Just path -> return path
-          -- if this hsc2hs is part of a GHC installation on
-          -- Windows, then we should use the mingw gcc that
-          -- comes with GHC (#3929)
-          case mb_libdir of
-              Nothing -> search_path
-              Just d  ->
-                  do let inplaceGcc = d ++ "/../mingw/bin/gcc.exe"
-                     b <- doesFileExist inplaceGcc
-                     if b then return inplaceGcc
-                          else search_path
+              -- if this hsc2hs is part of a GHC installation on
+              -- Windows, then we should use the mingw gcc that
+              -- comes with GHC (#3929)
+              inplaceGccs = case mb_libdir of
+                            Nothing -> []
+                            Just d  -> [d ++ 
"/../mingw/bin/x86_64-w64-mingw32-gcc.exe",
+                                        d ++ "/../mingw/bin/gcc.exe"]
+              search [] = search_path
+              search (x : xs) = do b <- doesFileExist x
+                                   if b then return x else search xs
+          search inplaceGccs
 
 parseFile :: String -> IO [Token]
 parseFile name



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to