[kaya] Fix qualifying issue in Driver.hs

Jochen Schmitt s4504kr at fedoraproject.org
Wed Aug 28 12:10:07 UTC 2013


commit 6a427eb233e97c5ba0cdb2c936fb52fa4b995739
Author: Jochen Schmitt <Jochen at herr-schmitt.de>
Date:   Wed Aug 28 14:09:51 2013 +0200

    Fix qualifying issue in Driver.hs

 kaya-0.5.2-ghc76.patch |   69 +++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 57 insertions(+), 12 deletions(-)
---
diff --git a/kaya-0.5.2-ghc76.patch b/kaya-0.5.2-ghc76.patch
index 7f2fc98..ff9bf85 100644
--- a/kaya-0.5.2-ghc76.patch
+++ b/kaya-0.5.2-ghc76.patch
@@ -1,6 +1,6 @@
 diff -up kaya-0.5.2/compiler/CodegenCPP.hs.ghc76 kaya-0.5.2/compiler/CodegenCPP.hs
---- kaya-0.5.2/compiler/CodegenCPP.hs.ghc76	2013-08-28 13:03:27.541927023 +0200
-+++ kaya-0.5.2/compiler/CodegenCPP.hs	2013-08-28 13:03:27.599923160 +0200
+--- kaya-0.5.2/compiler/CodegenCPP.hs.ghc76	2013-08-28 13:42:51.055633773 +0200
++++ kaya-0.5.2/compiler/CodegenCPP.hs	2013-08-28 13:42:51.061633374 +0200
 @@ -17,6 +17,8 @@ import Debug.Trace
  import Lib
  import Data.List
@@ -25,9 +25,16 @@ diff -up kaya-0.5.2/compiler/CodegenCPP.hs.ghc76 kaya-0.5.2/compiler/CodegenCPP.
  writecpp :: [CompileResult] -> [Output]
  writecpp [] = []
 diff -up kaya-0.5.2/compiler/Driver.hs.ghc76 kaya-0.5.2/compiler/Driver.hs
---- kaya-0.5.2/compiler/Driver.hs.ghc76	2013-08-28 13:03:27.548926556 +0200
-+++ kaya-0.5.2/compiler/Driver.hs	2013-08-28 13:03:27.601923027 +0200
-@@ -37,6 +37,7 @@ import System.Random
+--- kaya-0.5.2/compiler/Driver.hs.ghc76	2013-08-28 13:42:51.056633706 +0200
++++ kaya-0.5.2/compiler/Driver.hs	2013-08-28 13:55:18.446111437 +0200
+@@ -31,12 +31,13 @@ import RunTests
+ 
+ import System.Cmd
+ import System.Exit
+-import System.Directory
++import qualified System.Directory as Dir
+ import Portability
+ import System.Random
  import System.IO
  import Debug.Trace
  import Data.List
@@ -52,9 +59,29 @@ diff -up kaya-0.5.2/compiler/Driver.hs.ghc76 kaya-0.5.2/compiler/Driver.hs
  
  outputfile Module mod = showuser mod ++ ".o"
  -- TMP HACK: This should probably be a %extension "cgi" directive in the .ks
+@@ -187,7 +188,7 @@ comp' t root libdirs opts ctxt okin extr
+              -- If we want a shared lib, make one in addition
+              res <- makeSO t (libflags libdirs ++ showlist ofiles ++ showlist linkopts) (outputfile t mod) ctxt infdata
+ 	     copyc (keepc opts) tmpn root
+-	     removeFile tmpn
++	     Dir.removeFile tmpn
+ 	     if (exit /= ExitSuccess) 
+ 		then return CompError -- exitWith exit
+ 	        else if (t==Module) then do
+@@ -283,8 +284,8 @@ execTests root ok pri opts = do
+                          fpath ["-o", fout] 
+                          (tfilter (NoChase:opts)) True 
+       runthem <- system fout
+-      removeFile fpath
+-      removeFile fout
++      Dir.removeFile fpath
++      Dir.removeFile fout
+       if (runthem /= ExitSuccess)
+           then return CompError
+           else return res
 diff -up kaya-0.5.2/compiler/Module.hs.ghc76 kaya-0.5.2/compiler/Module.hs
---- kaya-0.5.2/compiler/Module.hs.ghc76	2013-08-28 13:03:27.567925291 +0200
-+++ kaya-0.5.2/compiler/Module.hs	2013-08-28 13:06:30.214776403 +0200
+--- kaya-0.5.2/compiler/Module.hs.ghc76	2013-08-28 13:42:51.057633640 +0200
++++ kaya-0.5.2/compiler/Module.hs	2013-08-28 13:42:51.061633374 +0200
 @@ -14,8 +14,9 @@ module Module(importVersion, findFile, f
                getAllLibDirs, linkFiles, getObjs) where
  
@@ -62,10 +89,28 @@ diff -up kaya-0.5.2/compiler/Module.hs.ghc76 kaya-0.5.2/compiler/Module.hs
 +import Control.Exception as E
  import Debug.Trace
 -import System.Directory
-+import System.Directory as Dir
++import qualified System.Directory as Dir
  import Data.List
  import Lib
  import Options
+@@ -223,7 +224,7 @@ getObjs p fp dls = do (fp,libs) <- go' p
+ 	      = fail $ "No such module " ++ path
+ 	  findFile (x:xs) path 
+ 	      = do --putStrLn $ "Looking in " ++ (x++path)
+-		   exist <- doesFileExist (x++path)
++		   exist <- Dir.doesFileExist (x++path)
+ 		   if exist 
+ 		      then return (x++path)
+ 		      else findFile xs path
+@@ -237,7 +238,7 @@ findLib :: [FilePath] -> FilePath -> IO
+ findLib [] path
+   = return Nothing -- fail $ "Can't find " ++ path
+ findLib (x:xs) path 
+-  = do ex <- doesFileExist (x++path)
++  = do ex <- Dir.doesFileExist (x++path)
+        if ex then return $ Just (x++path)
+ 	  else findLib xs path
+ 
 @@ -248,11 +249,11 @@ findFile :: [FilePath] -> FilePath -> IO
  findFile [] path
    = return Nothing
@@ -76,13 +121,13 @@ diff -up kaya-0.5.2/compiler/Module.hs.ghc76 kaya-0.5.2/compiler/Module.hs
  	     f <- readFile (x++path)
  	     return (Just f))
 -         (\e -> findFile xs path)
-+         (\ (e :: SomeException) -> Module.findFile xs path)
++         (\ (e :: SomeException) -> findFile xs path)
  
  -- Get all the library directories, looking at the options and the
  -- KAYA_LIBRARY_PATH environment variable.
 diff -up kaya-0.5.2/compiler/Portability64.hs.ghc76 kaya-0.5.2/compiler/Portability64.hs
 --- kaya-0.5.2/compiler/Portability64.hs.ghc76	2009-04-12 12:02:24.000000000 +0200
-+++ kaya-0.5.2/compiler/Portability64.hs	2013-08-28 13:03:27.607922628 +0200
++++ kaya-0.5.2/compiler/Portability64.hs	2013-08-28 13:42:51.061633374 +0200
 @@ -5,12 +5,14 @@ import System.IO
  import System.Environment
  import qualified Data.Map as Map
@@ -102,8 +147,8 @@ diff -up kaya-0.5.2/compiler/Portability64.hs.ghc76 kaya-0.5.2/compiler/Portabil
  tempfile :: IO (FilePath, Handle)
  tempfile = do env <- environment "TMPDIR"
 diff -up kaya-0.5.2/compiler/REPL.hs.in.ghc76 kaya-0.5.2/compiler/REPL.hs.in
---- kaya-0.5.2/compiler/REPL.hs.in.ghc76	2013-08-28 13:03:27.580924426 +0200
-+++ kaya-0.5.2/compiler/REPL.hs.in	2013-08-28 13:03:27.610922428 +0200
+--- kaya-0.5.2/compiler/REPL.hs.in.ghc76	2013-08-28 13:42:51.058633573 +0200
++++ kaya-0.5.2/compiler/REPL.hs.in	2013-08-28 13:42:51.062633308 +0200
 @@ -35,6 +35,8 @@ import System.IO
  import @readlinemodule@
  import System.Directory


More information about the scm-commits mailing list