potoki-core 2.2.14 → 2.2.15
raw patch · 2 files changed
+6/−5 lines, 2 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Potoki.Core.Produce: vector :: Vector input -> Produce input
+ Potoki.Core.Produce: vector :: Vector vector input => vector input -> Produce input
Files
- library/Potoki/Core/Produce.hs +5/−4
- potoki-core.cabal +1/−1
library/Potoki/Core/Produce.hs view
@@ -22,6 +22,7 @@ import qualified Potoki.Core.Fetch as A import qualified Data.HashMap.Strict as B import qualified Data.Vector as C+import qualified Data.Vector.Generic as GenericVector import qualified System.Directory as G import qualified Acquire.Acquire as M import qualified Data.ByteString.Lazy as D@@ -105,17 +106,17 @@ transformAcquire fetch {-# INLINE vector #-}-vector :: Vector input -> Produce input+vector :: GenericVector.Vector vector input => vector input -> Produce input vector vectorVal =- Produce $ M.Acquire $ do+ Produce $ liftIO $ do indexRef <- newIORef 0 let fetch = A.Fetch $ do indexVal <- readIORef indexRef writeIORef indexRef $! succ indexVal- return $ (C.!?) vectorVal indexVal- in return (fetch, return ())+ return $ (GenericVector.!?) vectorVal indexVal+ in return fetch {-# INLINE hashMapRows #-} hashMapRows :: HashMap a b -> Produce (a, b)
potoki-core.cabal view
@@ -1,5 +1,5 @@ name: potoki-core-version: 2.2.14+version: 2.2.15 synopsis: Low-level components of "potoki" description: Provides everything required for building custom instances of