From 2e583a9ebd56a6b0997a3165aa61deea8ad4cac4 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 10 Jun 2014 13:10:36 +0300 Subject: [PATCH] Add patches, remove upper bounds, and close #199 --- Stackage/Config.hs | 4 -- patching/patches/ChasingBottoms-1.3.0.7.patch | 34 ++++++++++ patching/patches/checkers-0.3.2.patch | 65 +++++++++++++++++++ patching/patches/uuid-1.3.3.patch | 12 ++++ 4 files changed, 111 insertions(+), 4 deletions(-) create mode 100644 patching/patches/ChasingBottoms-1.3.0.7.patch create mode 100644 patching/patches/checkers-0.3.2.patch create mode 100644 patching/patches/uuid-1.3.3.patch diff --git a/Stackage/Config.hs b/Stackage/Config.hs index 25ab4da9..899c2efa 100644 --- a/Stackage/Config.hs +++ b/Stackage/Config.hs @@ -399,10 +399,6 @@ defaultStablePackages ghcVer requireHP = unPackageMap $ execWriter $ do when (ghcVer == GhcMajorVersion 7 6 && requireHP) $ addRange "Michael Snoyman" "parsers" "< 0.11" - -- https://github.com/fpco/stackage/issues/199 - addRange "Michael Snoyman" "QuickCheck" "< 2.7" - addRange "Michael Snoyman" "tasty-quickcheck" "< 0.8.0.3" - -- https://github.com/fpco/stackage/issues/216 when (ghcVer == GhcMajorVersion 7 6) $ addRange "Michael Snoyman" "repa" "< 3.2.5.1" diff --git a/patching/patches/ChasingBottoms-1.3.0.7.patch b/patching/patches/ChasingBottoms-1.3.0.7.patch new file mode 100644 index 00000000..a3f7c871 --- /dev/null +++ b/patching/patches/ChasingBottoms-1.3.0.7.patch @@ -0,0 +1,34 @@ +diff -ru orig/ChasingBottoms.cabal new/ChasingBottoms.cabal +--- orig/ChasingBottoms.cabal 2014-06-10 13:09:03.210534172 +0300 ++++ new/ChasingBottoms.cabal 2014-06-10 13:09:03.000000000 +0300 +@@ -121,7 +121,7 @@ + + other-modules: Test.ChasingBottoms.IsType + +- build-depends: QuickCheck >= 2.1 && < 2.7, ++ build-depends: QuickCheck >= 2.1 && < 2.8, + mtl >= 1.1 && < 2.2, + base >= 4.0 && < 4.8, + containers >= 0.3 && < 0.6, +@@ -150,7 +150,7 @@ + Test.ChasingBottoms.TestUtilities.Generators, + Test.ChasingBottoms.TimeOut.Tests + +- build-depends: QuickCheck >= 2.1 && < 2.7, ++ build-depends: QuickCheck >= 2.1 && < 2.8, + mtl >= 1.1 && < 2.2, + base >= 4.0 && < 4.8, + containers >= 0.3 && < 0.6, +diff -ru orig/Test/ChasingBottoms/ContinuousFunctions.hs new/Test/ChasingBottoms/ContinuousFunctions.hs +--- orig/Test/ChasingBottoms/ContinuousFunctions.hs 2014-06-10 13:09:03.202534172 +0300 ++++ new/Test/ChasingBottoms/ContinuousFunctions.hs 2014-06-10 13:09:03.000000000 +0300 +@@ -143,7 +143,8 @@ + , listOf + ) where + +-import Test.QuickCheck hiding ((><), listOf) ++import Test.QuickCheck hiding ((><), listOf, infiniteListOf) ++import Test.QuickCheck.Gen.Unsafe (promote) + import Data.Sequence as Seq + import Data.Foldable as Seq (foldr) + import Prelude as P hiding (concat) diff --git a/patching/patches/checkers-0.3.2.patch b/patching/patches/checkers-0.3.2.patch new file mode 100644 index 00000000..5ff0397e --- /dev/null +++ b/patching/patches/checkers-0.3.2.patch @@ -0,0 +1,65 @@ +diff -ru orig/checkers.cabal new/checkers.cabal +--- orig/checkers.cabal 2014-06-10 13:09:03.522534168 +0300 ++++ new/checkers.cabal 2014-06-10 13:09:03.000000000 +0300 +@@ -27,7 +27,7 @@ + Library + hs-Source-Dirs: src + Extensions: +- Build-Depends: base < 5, random, QuickCheck>=2.3 && <2.7, array >= 0.1 ++ Build-Depends: base < 5, random, QuickCheck>=2.3 && <2.8, array >= 0.1 + Exposed-Modules: + Test.QuickCheck.Utils + Test.QuickCheck.Checkers +diff -ru orig/src/Test/QuickCheck/Checkers.hs new/src/Test/QuickCheck/Checkers.hs +--- orig/src/Test/QuickCheck/Checkers.hs 2014-06-10 13:09:03.518534168 +0300 ++++ new/src/Test/QuickCheck/Checkers.hs 2014-06-10 13:09:03.000000000 +0300 +@@ -51,7 +51,8 @@ + import qualified Control.Exception as Ex + import Data.List (foldl') + import System.Random +-import Test.QuickCheck ++import Test.QuickCheck hiding (generate) ++import Test.QuickCheck.Random (QCGen, newQCGen) + -- import System.IO.Unsafe + + import Test.QuickCheck.Gen (Gen (..)) -- for rand +@@ -442,12 +443,12 @@ + + -- | Generate n arbitrary values + arbs :: Arbitrary a => Int -> IO [a] +-arbs n = fmap (\ rnd -> generate n rnd (vector n)) newStdGen ++arbs n = fmap (\ rnd -> generate n rnd (vector n)) newQCGen + + -- | Produce n values from a generator + gens :: Int -> Gen a -> IO [a] + gens n gen = +- fmap (\ rnd -> generate 1000 rnd (sequence (replicate n gen))) newStdGen ++ fmap (\ rnd -> generate 1000 rnd (sequence (replicate n gen))) newQCGen + + -- The next two are from twanvl: + +@@ -500,10 +501,10 @@ + + -- TODO: are there QC2 replacements for these QC1 operations? + +-rand :: Gen StdGen ++rand :: Gen QCGen + rand = MkGen (\r _ -> r) + +-generate :: Int -> StdGen -> Gen a -> a ++generate :: Int -> QCGen -> Gen a -> a + generate n rnd (MkGen m) = m rnd' size + where + (size, rnd') = randomR (0, n) rnd +diff -ru orig/src/Test/QuickCheck/Instances/List.hs new/src/Test/QuickCheck/Instances/List.hs +--- orig/src/Test/QuickCheck/Instances/List.hs 2014-06-10 13:09:03.518534168 +0300 ++++ new/src/Test/QuickCheck/Instances/List.hs 2014-06-10 13:09:03.000000000 +0300 +@@ -8,7 +8,7 @@ + ,decreasingInf,nonincreasingInf + ) where + +-import Test.QuickCheck ++import Test.QuickCheck hiding (infiniteList) + import Test.QuickCheck.Instances.Num + import Control.Applicative + diff --git a/patching/patches/uuid-1.3.3.patch b/patching/patches/uuid-1.3.3.patch new file mode 100644 index 00000000..43269cd1 --- /dev/null +++ b/patching/patches/uuid-1.3.3.patch @@ -0,0 +1,12 @@ +diff -ru orig/uuid.cabal new/uuid.cabal +--- orig/uuid.cabal 2014-06-10 13:09:03.962534162 +0300 ++++ new/uuid.cabal 2014-06-10 13:09:03.000000000 +0300 +@@ -67,7 +67,7 @@ + uuid, + bytestring >= 0.9 && < 1.1, + HUnit >=1.2 && < 1.3, +- QuickCheck >=2.4 && < 2.7, ++ QuickCheck >=2.4 && < 2.8, + random >= 1.0.1 && < 1.1, + test-framework == 0.8.*, + test-framework-hunit == 0.3.*,