packages feed

conduit-combinators 1.0.2 → 1.0.3

raw patch · 4 files changed

+118/−6 lines, 4 filesdep ~mono-traversablePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: mono-traversable

API changes (from Hackage documentation)

+ Conduit: sourceRandomGenWith :: (Variate a, MonadBase base m, PrimMonad base) => Gen (PrimState base) -> (Gen (PrimState base) -> base a) -> Producer m a
+ Conduit: sourceRandomNGenWith :: (Variate a, MonadBase base m, PrimMonad base) => Gen (PrimState base) -> Int -> (Gen (PrimState base) -> base a) -> Producer m a
+ Conduit: sourceRandomNWith :: (Variate a, MonadIO m) => Int -> (GenIO -> IO a) -> Producer m a
+ Conduit: sourceRandomWith :: (Variate a, MonadIO m) => (GenIO -> IO a) -> Producer m a
+ Data.Conduit.Combinators: sourceRandomGenWith :: (Variate a, MonadBase base m, PrimMonad base) => Gen (PrimState base) -> (Gen (PrimState base) -> base a) -> Producer m a
+ Data.Conduit.Combinators: sourceRandomNGenWith :: (Variate a, MonadBase base m, PrimMonad base) => Gen (PrimState base) -> Int -> (Gen (PrimState base) -> base a) -> Producer m a
+ Data.Conduit.Combinators: sourceRandomNWith :: (Variate a, MonadIO m) => Int -> (GenIO -> IO a) -> Producer m a
+ Data.Conduit.Combinators: sourceRandomWith :: (Variate a, MonadIO m) => (GenIO -> IO a) -> Producer m a

Files

ChangeLog.md view
@@ -1,3 +1,7 @@+# 1.0.3++* sourceRandomWith [#19](https://github.com/fpco/conduit-combinators/pull/19)+ # 1.0.2  * Make mapAccumWhile & mapAccumS strict in accumulator state [#18](https://github.com/fpco/conduit-combinators/pull/18)
Data/Conduit/Combinators.hs view
@@ -47,6 +47,10 @@     , sourceRandomN     , sourceRandomGen     , sourceRandomNGen+    , sourceRandomWith+    , sourceRandomNWith+    , sourceRandomGenWith+    , sourceRandomNGenWith        -- ** Filesystem     , sourceDirectory@@ -452,7 +456,8 @@ -- -- Since 1.0.0 sourceRandom :: (MWC.Variate a, MonadIO m) => Producer m a-INLINE_RULE0(sourceRandom, initRepeat (liftIO MWC.createSystemRandom) (liftIO . MWC.uniform))+sourceRandom = sourceRandomWith MWC.uniform+{-# INLINE sourceRandom #-}  -- | Create a stream of random values of length n, seeding from the system -- random number.@@ -463,7 +468,8 @@ sourceRandomN :: (MWC.Variate a, MonadIO m)               => Int -- ^ count               -> Producer m a-INLINE_RULE(sourceRandomN, cnt, initReplicate (liftIO MWC.createSystemRandom) (liftIO . MWC.uniform) cnt)+sourceRandomN cnt = sourceRandomNWith cnt MWC.uniform+{-# INLINE sourceRandomN #-}  -- | Create an infinite stream of random values, using the given random number -- generator.@@ -474,7 +480,8 @@ sourceRandomGen :: (MWC.Variate a, MonadBase base m, PrimMonad base)                 => MWC.Gen (PrimState base)                 -> Producer m a-INLINE_RULE(sourceRandomGen, gen, initRepeat (return gen) (liftBase . MWC.uniform))+sourceRandomGen gen = sourceRandomGenWith gen MWC.uniform+{-# INLINE sourceRandomGen #-}  -- | Create a stream of random values of length n, seeding from the system -- random number.@@ -486,7 +493,54 @@                  => MWC.Gen (PrimState base)                  -> Int -- ^ count                  -> Producer m a-INLINE_RULE(sourceRandomNGen, gen cnt, initReplicate (return gen) (liftBase . MWC.uniform) cnt)+sourceRandomNGen gen cnt = sourceRandomNGenWith gen cnt MWC.uniform+{-# INLINE sourceRandomNGen #-}++-- | Create an infinite stream of random values from an arbitrary distribution,+-- seeding from the system random number.+--+-- Subject to fusion+--+-- Since 1.0.3+sourceRandomWith :: (MWC.Variate a, MonadIO m) => (MWC.GenIO -> SIO.IO a) -> Producer m a+INLINE_RULE(sourceRandomWith, f, initRepeat (liftIO MWC.createSystemRandom) (liftIO . f))++-- | Create a stream of random values of length n from an arbitrary+-- distribution, seeding from the system random number.+--+-- Subject to fusion+--+-- Since 1.0.3+sourceRandomNWith :: (MWC.Variate a, MonadIO m)+                  => Int -- ^ count+                  -> (MWC.GenIO -> SIO.IO a)+                  -> Producer m a+INLINE_RULE(sourceRandomNWith, cnt f, initReplicate (liftIO MWC.createSystemRandom) (liftIO . f) cnt)++-- | Create an infinite stream of random values from an arbitrary distribution,+-- using the given random number generator.+--+-- Subject to fusion+--+-- Since 1.0.3+sourceRandomGenWith :: (MWC.Variate a, MonadBase base m, PrimMonad base)+                    => MWC.Gen (PrimState base)+                    -> (MWC.Gen (PrimState base) -> base a)+                    -> Producer m a+INLINE_RULE(sourceRandomGenWith, gen f, initRepeat (return gen) (liftBase . f))++-- | Create a stream of random values of length n from an arbitrary+-- distribution, seeding from the system random number.+--+-- Subject to fusion+--+-- Since 1.0.3+sourceRandomNGenWith :: (MWC.Variate a, MonadBase base m, PrimMonad base)+                     => MWC.Gen (PrimState base)+                     -> Int -- ^ count+                     -> (MWC.Gen (PrimState base) -> base a)+                     -> Producer m a+INLINE_RULE(sourceRandomNGenWith, gen cnt f, initReplicate (return gen) (liftBase . f) cnt)  -- | Stream the contents of the given directory, without traversing deeply. --
Data/Conduit/Combinators/Unqualified.hs view
@@ -34,6 +34,10 @@     , sourceRandomN     , sourceRandomGen     , sourceRandomNGen+    , sourceRandomWith+    , sourceRandomNWith+    , sourceRandomGenWith+    , sourceRandomNGenWith        -- *** Filesystem     , sourceDirectory@@ -379,6 +383,56 @@                  -> Producer m a sourceRandomNGen = CC.sourceRandomNGen {-# INLINE sourceRandomNGen #-}++-- | Create an infinite stream of random values from an arbitrary distribution,+-- seeding from the system random number.+--+-- Subject to fusion+--+-- Since 1.0.3+sourceRandomWith :: (MWC.Variate a, MonadIO m) => (MWC.GenIO -> SIO.IO a) -> Producer m a+sourceRandomWith = CC.sourceRandomWith+{-# INLINE sourceRandomWith #-}++-- | Create a stream of random values of length n from an arbitrary+-- distribution, seeding from the system random number.+--+-- Subject to fusion+--+-- Since 1.0.3+sourceRandomNWith :: (MWC.Variate a, MonadIO m)+                  => Int -- ^ count+                  -> (MWC.GenIO -> SIO.IO a)+                  -> Producer m a+sourceRandomNWith = CC.sourceRandomNWith+{-# INLINE sourceRandomNWith #-}++-- | Create an infinite stream of random values from an arbitrary distribution,+-- using the given random number generator.+--+-- Subject to fusion+--+-- Since 1.0.3+sourceRandomGenWith :: (MWC.Variate a, MonadBase base m, PrimMonad base)+                    => MWC.Gen (PrimState base)+                    -> (MWC.Gen (PrimState base) -> base a)+                    -> Producer m a+sourceRandomGenWith = CC.sourceRandomGenWith+{-# INLINE sourceRandomGenWith #-}++-- | Create a stream of random values of length n from an arbitrary+-- distribution, seeding from the system random number.+--+-- Subject to fusion+--+-- Since 1.0.3+sourceRandomNGenWith :: (MWC.Variate a, MonadBase base m, PrimMonad base)+                     => MWC.Gen (PrimState base)+                     -> Int -- ^ count+                     -> (MWC.Gen (PrimState base) -> base a)+                     -> Producer m a+sourceRandomNGenWith= CC.sourceRandomNGenWith+{-# INLINE sourceRandomNGenWith #-}  -- | Stream the contents of the given directory, without traversing deeply. --
conduit-combinators.cabal view
@@ -1,5 +1,5 @@ name:                conduit-combinators-version:             1.0.2+version:             1.0.3 synopsis:            Commonly used conduit functions, for both chunked and unchunked data description:         Provides a replacement for Data.Conduit.List, as well as a convenient Conduit module. homepage:            https://github.com/fpco/conduit-combinators@@ -25,7 +25,7 @@                      , transformers                      , transformers-base                      , primitive-                     , mono-traversable >= 0.4+                     , mono-traversable >= 0.5                      , vector                      , text                      , bytestring