nonempty-vector 0.2.0.0 → 0.2.0.1
raw patch · 3 files changed
+9/−3 lines, 3 files
Files
- CHANGELOG.md +6/−0
- nonempty-vector.cabal +1/−1
- src/Data/Vector/NonEmpty.hs +2/−2
CHANGELOG.md view
@@ -1,5 +1,11 @@ # Revision history for nonempty-vector +## 0.2.0.1++* Missed a strictness tick in `postscanl'`++* INLINE pragma for slice+ ## 0.2.0.0 * Remove naughty `Generic`, and `Alternative` instances as they can construct empty `NonEmptyVector`s
nonempty-vector.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.24 name: nonempty-vector-version: 0.2.0.0+version: 0.2.0.1 synopsis: Non-empty vectors description: Performant non-empty mutable and immutable vectors. These vectors strive to implement
src/Data/Vector/NonEmpty.hs view
@@ -444,6 +444,7 @@ -- slice :: Int -> Int -> NonEmptyVector a -> Vector a slice i n = V.slice i n . _neVec+{-# INLINE slice #-} -- | /O(1)/ Yield all but the last element without copying. Since the -- vector returned may be empty (i.e. input was a singleton), this function@@ -1333,7 +1334,6 @@ -- ^ list of index/value pairs (of length @n@) -> NonEmptyVector a accum f (NonEmptyVector v) u = NonEmptyVector (V.accum f v u)- {-# INLINE accum #-} -- | /O(m+n)/ For each pair @(i,b)@ from the vector of pairs, replace the@@ -2627,7 +2627,7 @@ -- | /O(n)/ Right-to-left prescan with strict accumulator -- prescanr' :: (a -> b -> b) -> b -> NonEmptyVector a -> NonEmptyVector b-prescanr' f b = NonEmptyVector . V.prescanr f b . _neVec+prescanr' f b = NonEmptyVector . V.prescanr' f b . _neVec {-# INLINE prescanr' #-} -- | /O(n)/ Right-to-left scan