packages feed

conduit 1.2.2.1 → 1.2.2.2

raw patch · 4 files changed

+40/−5 lines, 4 filesdep ~QuickCheckPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: QuickCheck

API changes (from Hackage documentation)

Files

Data/Conduit/List.hs view
@@ -4,6 +4,9 @@ -- | Higher-level functions to interact with the elements of a stream. Most of -- these are based on list functions. --+-- For many purposes, it's recommended to use the conduit-combinators library,+-- which provides a more complete set of functions.+-- -- Note that these functions all deal with individual elements of a stream as a -- sort of \"black box\", where there is no introspection of the contained -- elements. Values such as @ByteString@ and @Text@ will likely need to be
conduit.cabal view
@@ -1,5 +1,5 @@ Name:                conduit-Version:             1.2.2.1+Version:             1.2.2.2 Synopsis:            Streaming data processing library. Description:     @conduit@ is a solution to the streaming data problem, allowing for production, transformation, and consumption of streams of data in constant memory. It is an alternative to lazy I\/O which guarantees deterministic resource handling, and fits in the same general solution space as @enumerator@\/@iteratee@ and @pipes@. For a tutorial, please visit <https://haskell.fpcomplete.com/user/snoyberg/library-documentation/conduit-overview>.@@ -48,7 +48,7 @@     build-depends:   conduit                    , base                    , hspec >= 1.3-                   , QuickCheck+                   , QuickCheck >= 2.5                    , transformers                    , mtl                    , resourcet
test/Data/Conduit/StreamSpec.hs view
@@ -2,6 +2,7 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RankNTypes #-}+{-# LANGUAGE CPP #-} module Data.Conduit.StreamSpec where  import           Control.Applicative@@ -14,13 +15,12 @@ import           Data.Conduit.Internal.List.Stream import           Data.Conduit.List import qualified Data.Foldable as F-import qualified Data.Foldable import           Data.Function (on) import qualified Data.List import qualified Data.Maybe import           Data.Monoid (Monoid(..)) import           Prelude-    ((.), ($), (>>=), (=<<), return, (==), Int, id, Maybe(..), Monad, Bool(..),+    ((.), ($), (>>=), (=<<), return, (==), Int, id, Maybe(..), Monad,      Eq, Show, String, Functor, fst, snd) import qualified Prelude import qualified Safe@@ -106,7 +106,7 @@     qit "foldMap" $         \(getBlind -> (f :: Int -> Sum Int)) ->             foldMap f `checkConsumer`-            Data.Foldable.foldMap f+            F.foldMap f     qit "mapM_" $         \(getBlind -> (f :: Int -> M ())) ->             mapM_ f `checkConsumerM`@@ -572,6 +572,28 @@     go s (x:xs) = do         (s', r) <- f x s         liftM (\(l, o) -> (r:l, o)) $ go s' xs++--------------------------------------------------------------------------------+-- Utilities from QuickCheck-2.7 (absent in earlier versions)++#if !MIN_VERSION_QuickCheck(2,7,0)+getBlind :: Blind a -> a+getBlind (Blind x) = x++-- | @Small x@: generates values of @x@ drawn from a small range.+-- The opposite of 'Large'.+newtype Small a = Small {getSmall :: a}+    deriving (Prelude.Ord, Prelude.Eq, Prelude.Enum, Prelude.Show)++instance Prelude.Integral a => Arbitrary (Small a) where+    arbitrary = Prelude.fmap Small arbitrarySizedIntegral+    shrink (Small x) = Prelude.map Small (shrinkIntegral x)++(===) :: (Show a, Eq a) => a -> a -> Property+x === y = whenFail+    (Prelude.fail $ Prelude.show x Prelude.++ " should match " Prelude.++ Prelude.show y)+    (x == y)+#endif  -------------------------------------------------------------------------------- -- Utilities taken from monad-loops package
test/main.hs view
@@ -1,6 +1,8 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE FlexibleInstances #-}+{-# OPTIONS_GHC -fno-warn-orphans #-} import Test.Hspec import Test.Hspec.QuickCheck (prop) import Test.QuickCheck.Monadic (assert, monadicIO, run)@@ -33,6 +35,14 @@ import qualified Data.Map as Map import qualified Data.Conduit.Extra.ZipConduitSpec as ZipConduit import qualified Data.Conduit.StreamSpec as Stream+#if !MIN_VERSION_QuickCheck(2,6,0)+import Test.QuickCheck (Testable(..))+import Test.QuickCheck.Property (morallyDubiousIOProperty)++instance Testable (IO ()) where+    property = morallyDubiousIOProperty . (>> return True)+    exhaustive _ = True+#endif  (@=?) :: (Eq a, Show a) => a -> a -> IO () (@=?) = flip shouldBe