summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-haskell/c2hs/files')
-rw-r--r--dev-haskell/c2hs/files/c2hs-0.16.3-ghc-7.6.patch45
-rw-r--r--dev-haskell/c2hs/files/c2hs-0.16.3-language-c-0.4.patch25
-rw-r--r--dev-haskell/c2hs/files/c2hs-0.16.4-ghc-7.6.patch34
3 files changed, 104 insertions, 0 deletions
diff --git a/dev-haskell/c2hs/files/c2hs-0.16.3-ghc-7.6.patch b/dev-haskell/c2hs/files/c2hs-0.16.3-ghc-7.6.patch
new file mode 100644
index 000000000000..2b6adb2f0f6d
--- /dev/null
+++ b/dev-haskell/c2hs/files/c2hs-0.16.3-ghc-7.6.patch
@@ -0,0 +1,45 @@
+--- c2hs-0.16.3-orig/src/C2HS/Config.hs 2011-03-25 00:04:59.000000000 +1100
++++ c2hs-0.16.3/src/C2HS/Config.hs 2012-09-16 10:57:54.514595408 +1000
+@@ -1,3 +1,4 @@
++{-# LANGUAGE CPP #-}
+ -- -*-haskell-*-
+ -- ** @configure_input@ **
+ -- ===========================================================================
+@@ -38,6 +39,10 @@
+
+ import Foreign (toBool)
+ import Foreign.C (CInt)
++#if (__GLASGOW_HASKELL__>=705)
++import Foreign.C.Types(CInt(..))
++#endif
++
+ import System.Info (arch, os)
+
+ -- program settings
+--- c2hs-0.16.3-orig/src/Control/StateTrans.hs 2011-03-25 00:04:59.000000000 +1100
++++ c2hs-0.16.3/src/Control/StateTrans.hs 2012-09-16 10:56:52.470863551 +1000
+@@ -1,3 +1,4 @@
++{-# LANGUAGE CPP, ScopedTypeVariables #-}
+ -- The HiPar Toolkit: state transformer routines
+ --
+ -- Author : Manuel M. T. Chakravarty
+@@ -73,6 +74,10 @@
+ throwExc, fatal, catchExc, fatalsHandledBy)
+ where
+
++#if !MIN_VERSION_base(4,6,0)
++import Prelude hiding (catch)
++#endif
++import Control.Exception (catch, IOException)
+
+ -- BEWARE! You enter monad country. Read any of Wadler's or
+ -- Launchbury/Peyton-Jones' texts before entering. Otherwise,
+@@ -296,7 +301,7 @@
+ ioError err
+ Right _a -> return state
+ )
+- `catch` (\err -> let
++ `catch` (\(err :: IOException) -> let
+ STB handler' = handler err
+ in
+ handler' bs gs)
diff --git a/dev-haskell/c2hs/files/c2hs-0.16.3-language-c-0.4.patch b/dev-haskell/c2hs/files/c2hs-0.16.3-language-c-0.4.patch
new file mode 100644
index 000000000000..cdf0fbe547d6
--- /dev/null
+++ b/dev-haskell/c2hs/files/c2hs-0.16.3-language-c-0.4.patch
@@ -0,0 +1,25 @@
+diff --git a/c2hs.cabal b/c2hs.cabal
+index 89f978f..53a96e5 100644
+--- a/c2hs.cabal
++++ b/c2hs.cabal
+@@ -41,7 +41,7 @@ flag base3
+
+ Executable c2hs
+ Build-Depends: base >= 2 && < 5,
+- language-c >= 0.3.1.1 && < 0.4.0,
++ language-c >= 0.3.1.1 && < 0.5,
+ filepath
+
+ if flag(base3)
+diff --git a/src/C2HS/Gen/Bind.hs b/src/C2HS/Gen/Bind.hs
+index 1fd2acc..9c25b42 100644
+--- a/src/C2HS/Gen/Bind.hs
++++ b/src/C2HS/Gen/Bind.hs
+@@ -117,6 +117,7 @@ import Control.Monad (when, unless, liftM, mapAndUnzipM)
+ import Language.C.Data.Position
+ import Language.C.Data.Ident
+ import Language.C.Pretty
++import Language.C.Syntax.AST
+ import Text.PrettyPrint.HughesPJ (render)
+ import Data.Errors
+ import Data.Attributes (newAttrsOnlyPos)
diff --git a/dev-haskell/c2hs/files/c2hs-0.16.4-ghc-7.6.patch b/dev-haskell/c2hs/files/c2hs-0.16.4-ghc-7.6.patch
new file mode 100644
index 000000000000..e6d808bb98a5
--- /dev/null
+++ b/dev-haskell/c2hs/files/c2hs-0.16.4-ghc-7.6.patch
@@ -0,0 +1,34 @@
+--- c2hs-0.16.4-orig/src/C2HS/Config.hs 2012-11-01 08:02:48.000000000 +1100
++++ c2hs-0.16.4/src/C2HS/Config.hs 2012-11-03 12:12:15.754353409 +1100
+@@ -1,3 +1,4 @@
++{-# LANGUAGE CPP #-}
+ -- -*-haskell-*-
+ -- ** @configure_input@ **
+ -- ===========================================================================
+--- c2hs-0.16.4-orig/src/Control/StateTrans.hs 2012-11-01 08:02:48.000000000 +1100
++++ c2hs-0.16.4/src/Control/StateTrans.hs 2012-11-03 12:12:15.755353436 +1100
+@@ -1,3 +1,4 @@
++{-# LANGUAGE CPP, ScopedTypeVariables #-}
+ -- The HiPar Toolkit: state transformer routines
+ --
+ -- Author : Manuel M. T. Chakravarty
+@@ -80,6 +81,10 @@
+ -- Launchbury/Peyton-Jones' texts before entering. Otherwise,
+ -- your mental health my be in danger. You have been warned!
+
++#if !MIN_VERSION_base(4,6,0)
++import Prelude hiding (catch)
++#endif
++import Control.Exception (catch, IOException)
+
+ -- state transformer base and its monad operations
+ -- -----------------------------------------------
+@@ -298,7 +303,7 @@
+ ioError err
+ Right _a -> return state
+ )
+- `catch` (\err -> let
++ `catch` (\(err :: IOException) -> let
+ STB handler' = handler err
+ in
+ handler' bs gs)