[kaya] Fix issue in REPL.hs
Jochen Schmitt
s4504kr at fedoraproject.org
Tue Aug 27 18:51:34 UTC 2013
commit 049c1989328c79f96fa534e872a789723b27c698
Author: Jochen Schmitt <Jochen at herr-schmitt.de>
Date: Tue Aug 27 20:51:22 2013 +0200
Fix issue in REPL.hs
kaya-0.5.2-ghc76.patch | 38 ++++++++++++++++++++++++++++++++------
1 files changed, 32 insertions(+), 6 deletions(-)
---
diff --git a/kaya-0.5.2-ghc76.patch b/kaya-0.5.2-ghc76.patch
index 677a795..1a30872 100644
--- a/kaya-0.5.2-ghc76.patch
+++ b/kaya-0.5.2-ghc76.patch
@@ -17,21 +17,47 @@ 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) -> 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-27 19:21:23.973051109 +0200
-@@ -8,9 +8,7 @@ import qualified Data.Map as Map
++++ kaya-0.5.2/compiler/Portability64.hs 2013-08-27 20:50:43.103460218 +0200
+@@ -5,12 +5,14 @@ import System.IO
+ import System.Environment
+ import qualified Data.Map as Map
+
++import Data.Exception
++
-- GHC 6.4 and above library incompatibilities.
environment :: String -> IO (Maybe String)
--environment x = catch (do e <- getEnv x
-- return (Just e))
+ environment x = catch (do e <- getEnv x
+ return (Just e))
- (\_ -> return Nothing)
-+environment = lookupEnv
++ ( \ ( _ :: SomeException) -> return Nothing)
tempfile :: IO (FilePath, Handle)
tempfile = do env <- environment "TMPDIR"
+diff -up kaya-0.5.2/compiler/REPL.hs.in.haskell98.ghc76 kaya-0.5.2/compiler/REPL.hs.in.haskell98
+--- kaya-0.5.2/compiler/REPL.hs.in.haskell98.ghc76 2013-08-27 20:46:52.615742178 +0200
++++ kaya-0.5.2/compiler/REPL.hs.in.haskell98 2013-08-27 20:48:30.549247731 +0200
+@@ -35,6 +35,8 @@ import IO
+ import @readlinemodule@
+ import System.Directory
+
++Import Control.Exception
++
+ foreign import ccall "repl_load.h" interp_load :: Ptr CChar -> IO ()
+ foreign import ccall "repl_load.h" interp_close :: IO ()
+ foreign import ccall "repl_load.h" interp_clear :: IO ()
+@@ -160,7 +162,7 @@ runREPL so mod libdirs ctxt ectxt gctxt
+ xfn <- substTerm mod ctxt phi xrv
+ let xinft = subst phi ity
+ catch (runProg xfn xinft)
+- (\e -> putStrLn(show e))
++ (\(e :: SomeException) -> putStrLn(show e))
+ Failure err file line -> do reportError err
+ processREPL (Failure err file line)
+ = do reportError err
More information about the scm-commits
mailing list