From 14e6cc712370bb8624944f2a11ab84d2cfb2d895 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Mon, 9 Dec 2013 18:37:01 +0200 Subject: [PATCH] Some GHC 7.8 patches --- patching/patches/async-2.0.1.4.patch | 19 +++++++++ .../patches/language-javascript-0.5.8.patch | 39 +++++++++++++++++++ patching/patches/monad-peel-0.1.1.patch | 34 ++++++++++++++++ patching/patches/vault-0.3.0.2.patch | 12 ++++++ 4 files changed, 104 insertions(+) create mode 100644 patching/patches/async-2.0.1.4.patch create mode 100644 patching/patches/language-javascript-0.5.8.patch create mode 100644 patching/patches/monad-peel-0.1.1.patch create mode 100644 patching/patches/vault-0.3.0.2.patch diff --git a/patching/patches/async-2.0.1.4.patch b/patching/patches/async-2.0.1.4.patch new file mode 100644 index 00000000..07eef2e9 --- /dev/null +++ b/patching/patches/async-2.0.1.4.patch @@ -0,0 +1,19 @@ +diff -ru orig/async.cabal new/async.cabal +--- orig/async.cabal 2013-12-09 14:04:55.984162531 +0200 ++++ new/async.cabal 2013-12-09 14:04:55.000000000 +0200 +@@ -70,13 +70,13 @@ + + library + exposed-modules: Control.Concurrent.Async +- build-depends: base >= 4.3 && < 4.7, stm >= 2.2 && < 2.5 ++ build-depends: base >= 4.3 && < 4.8, stm >= 2.2 && < 2.5 + + test-suite test-async + type: exitcode-stdio-1.0 + hs-source-dirs: test + main-is: test-async.hs +- build-depends: base >= 4.3 && < 4.7, ++ build-depends: base >= 4.3 && < 4.8, + async, + test-framework, + test-framework-hunit, diff --git a/patching/patches/language-javascript-0.5.8.patch b/patching/patches/language-javascript-0.5.8.patch new file mode 100644 index 00000000..50c509d9 --- /dev/null +++ b/patching/patches/language-javascript-0.5.8.patch @@ -0,0 +1,39 @@ +Only in new: dist +diff -ru orig/language-javascript.cabal new/language-javascript.cabal +--- orig/language-javascript.cabal 2013-12-09 14:11:28.596175378 +0200 ++++ new/language-javascript.cabal 2013-12-09 14:11:28.000000000 +0200 +@@ -30,7 +30,7 @@ + + Library + Build-depends: base >= 4 && < 5 +- , array >= 0.3 && < 0.5 ++ , array >= 0.3 && < 0.6 + , mtl >= 1.1 && < 2.9 + , containers >= 0.2 && < 0.6 + , utf8-light >= 0.4 && < 1.0 +diff -ru orig/src/Language/JavaScript/Parser/Lexer.hs new/src/Language/JavaScript/Parser/Lexer.hs +--- orig/src/Language/JavaScript/Parser/Lexer.hs 2013-12-09 14:11:28.592175378 +0200 ++++ new/src/Language/JavaScript/Parser/Lexer.hs 2013-12-09 14:11:27.000000000 +0200 +@@ -1,4 +1,4 @@ +-{-# LANGUAGE CPP,MagicHash #-} ++{-# LANGUAGE BangPatterns, CPP,MagicHash #-} + {-# LINE 1 "src-dev/Language/JavaScript/Parser/Lexer.x" #-} + + +@@ -708,11 +708,15 @@ + + let + (base) = alexIndexInt32OffAddr alex_base s +- ((I# (ord_c))) = fromIntegral c ++ !((I# (ord_c))) = fromIntegral c + (offset) = (base +# ord_c) + (check) = alexIndexInt16OffAddr alex_check offset + ++#if MIN_VERSION_base(4, 7, 0) ++ (new_s) = if (I# (offset >=# 0#) /= 0) && (I# (check ==# ord_c) /= 0) ++#else + (new_s) = if (offset >=# 0#) && (check ==# ord_c) ++#endif + then alexIndexInt16OffAddr alex_table offset + else alexIndexInt16OffAddr alex_deflt s + in diff --git a/patching/patches/monad-peel-0.1.1.patch b/patching/patches/monad-peel-0.1.1.patch new file mode 100644 index 00000000..43db09f2 --- /dev/null +++ b/patching/patches/monad-peel-0.1.1.patch @@ -0,0 +1,34 @@ +diff -ru orig/Control/Exception/Peel.hs new/Control/Exception/Peel.hs +--- orig/Control/Exception/Peel.hs 2013-12-09 18:35:35.592693947 +0200 ++++ new/Control/Exception/Peel.hs 2013-12-09 18:35:35.000000000 +0200 +@@ -1,3 +1,4 @@ ++{-# LANGUAGE CPP #-} + {-# LANGUAGE ExistentialQuantification #-} + + {- | +@@ -20,7 +21,9 @@ + handle, handleJust, + try, tryJust, + evaluate, ++#if !MIN_VERSION_base(4, 7, 0) + block, unblock, ++#endif + bracket, bracket_, bracketOnError, + finally, onException, + ) where +@@ -108,6 +111,7 @@ + evaluate :: MonadIO m => a -> m a + evaluate = liftIO . E.evaluate + ++#if !MIN_VERSION_base(4, 7, 0) + -- |Generalized version of 'E.block'. + block :: MonadPeelIO m => m a -> m a + block = liftIOOp_ E.block +@@ -115,6 +119,7 @@ + -- |Generalized version of 'E.unblock'. + unblock :: MonadPeelIO m => m a -> m a + unblock = liftIOOp_ E.unblock ++#endif + + -- |Generalized version of 'E.bracket'. Note, any monadic side + -- effects in @m@ of the \"release\" computation will be discarded; it diff --git a/patching/patches/vault-0.3.0.2.patch b/patching/patches/vault-0.3.0.2.patch new file mode 100644 index 00000000..3b2a1344 --- /dev/null +++ b/patching/patches/vault-0.3.0.2.patch @@ -0,0 +1,12 @@ +diff -ru orig/vault.cabal new/vault.cabal +--- orig/vault.cabal 2013-12-09 14:04:56.244162539 +0200 ++++ new/vault.cabal 2013-12-09 14:04:56.000000000 +0200 +@@ -47,7 +47,7 @@ + + Library + hs-source-dirs: src +- build-depends: base >= 4.5 && < 4.7, ++ build-depends: base >= 4.5 && < 4.8, + containers >= 0.4 && < 0.6, + unordered-containers >= 0.2.3.0 && < 0.3, + hashable >= 1.1.2.5 && < 1.3