diff --git a/Stackage/Config.hs b/Stackage/Config.hs index 196764c8..a04d5090 100644 --- a/Stackage/Config.hs +++ b/Stackage/Config.hs @@ -314,9 +314,6 @@ defaultStablePackages ghcVer = unPackageMap $ execWriter $ do -- https://github.com/fpco/stackage/issues/46 addRange "Michael Snoyman" "QuickCheck" "< 2.6" - -- https://github.com/fpco/stackage/issues/68 - addRange "Michael Snoyman" "criterion" "< 0.8" - -- https://github.com/fpco/stackage/issues/72 addRange "Michael Snoyman" "HaXml" "< 1.24" diff --git a/patching/patches/criterion-0.8.0.0.patch b/patching/patches/criterion-0.8.0.0.patch new file mode 100644 index 00000000..381d368e --- /dev/null +++ b/patching/patches/criterion-0.8.0.0.patch @@ -0,0 +1,55 @@ +diff -ru orig/Criterion/IO.hs new/Criterion/IO.hs +--- orig/Criterion/IO.hs 2014-02-21 06:51:14.286525542 +0200 ++++ new/Criterion/IO.hs 2014-02-21 06:51:14.000000000 +0200 +@@ -1,4 +1,5 @@ + {-# LANGUAGE OverloadedStrings #-} ++{-# LANGUAGE CPP #-} + -- | + -- Module : Criterion.IO + -- Copyright : (c) 2009, 2010 Bryan O'Sullivan +@@ -21,7 +22,11 @@ + + import Criterion.Types (ResultForest, ResultTree(..)) + import Data.Binary (Binary(..), encode) ++#if MIN_VERSION_binary(0, 6, 3) + import Data.Binary.Get (runGetOrFail) ++#else ++import Data.Binary.Get (runGetState) ++#endif + import Data.Binary.Put (putByteString, putWord16be, runPut) + import Data.Version (Version(..)) + import Paths_criterion (version) +@@ -56,6 +61,7 @@ + writeResults :: FilePath -> ResultForest -> IO () + writeResults path rs = withFile path WriteMode (flip hPutResults rs) + ++#if MIN_VERSION_binary(0, 6, 3) + readAll :: Binary a => Handle -> IO [a] + readAll handle = do + let go bs +@@ -64,3 +70,13 @@ + Left (_, _, err) -> fail err + Right (bs', _, a) -> (a:) `fmap` go bs' + go =<< L.hGetContents handle ++#else ++readAll :: Binary a => Handle -> IO [a] ++readAll handle = do ++ let go i bs ++ | L.null bs = return [] ++ | otherwise = ++ let (a, bs', i') = runGetState get bs i ++ in (a:) `fmap` go i' bs' ++ go 0 =<< L.hGetContents handle ++#endif +diff -ru orig/criterion.cabal new/criterion.cabal +--- orig/criterion.cabal 2014-02-21 06:51:14.314525543 +0200 ++++ new/criterion.cabal 2014-02-21 06:51:14.000000000 +0200 +@@ -58,7 +58,7 @@ + build-depends: + aeson >= 0.3.2.12, + base < 5, +- binary >= 0.6.3.0, ++ binary >= 0.5.1.0, + bytestring >= 0.9 && < 1.0, + containers, + deepseq >= 1.1.0.0,