From eabeb73d29a087121e9334862b559a82f4cb6d9b Mon Sep 17 00:00:00 2001 From: Alexey Khudyakov Date: Wed, 31 Dec 2025 15:18:22 +0300 Subject: [PATCH 1/3] Redundant constraint --- fixed-vector/Data/Vector/Fixed/Internal.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fixed-vector/Data/Vector/Fixed/Internal.hs b/fixed-vector/Data/Vector/Fixed/Internal.hs index c25e5fd..d73968b 100644 --- a/fixed-vector/Data/Vector/Fixed/Internal.hs +++ b/fixed-vector/Data/Vector/Fixed/Internal.hs @@ -607,7 +607,7 @@ izipWithM f v u = fmap vector -- | Zip two vector elementwise using monadic function and discard -- result izipWithM_ - :: (Vector v a, Vector v b, Vector v c, Applicative f, Vector v (f c)) + :: (Vector v a, Vector v b, Vector v c, Applicative f) => (Int -> a -> b -> f c) -> v a -> v b -> f () {-# INLINE izipWithM_ #-} izipWithM_ f xs ys = C.izipWithM_ f (C.cvec xs) (C.cvec ys) From 49743fb5f6e5a49a0c19f58b9bebfe7fe93ee623 Mon Sep 17 00:00:00 2001 From: Alexey Khudyakov Date: Wed, 31 Dec 2025 17:08:52 +0300 Subject: [PATCH 2/3] Missing export of ifoldl' --- fixed-vector/ChangeLog.md | 2 +- fixed-vector/Data/Vector/Fixed.hs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fixed-vector/ChangeLog.md b/fixed-vector/ChangeLog.md index afe59f6..0196a7d 100644 --- a/fixed-vector/ChangeLog.md +++ b/fixed-vector/ChangeLog.md @@ -5,7 +5,7 @@ data types defined in library now has `Prim` instance. * `Foldable1` could be derived using `ViaFixed`. All types for which it could be defined now has it. For GHC<9.6 `foldable1-classes-compat` is used. - +* `ifoldl'` added. 2.0.0.0 [2025.07.10] ------------------ diff --git a/fixed-vector/Data/Vector/Fixed.hs b/fixed-vector/Data/Vector/Fixed.hs index de57f0e..f36023b 100644 --- a/fixed-vector/Data/Vector/Fixed.hs +++ b/fixed-vector/Data/Vector/Fixed.hs @@ -129,6 +129,7 @@ module Data.Vector.Fixed ( , fold , foldMap , ifoldl + , ifoldl' , ifoldr , foldM , ifoldM From 2e9cf8d039409397ace38655ce8015bd9e97fb69 Mon Sep 17 00:00:00 2001 From: Alexey Khudyakov Date: Thu, 1 Jan 2026 02:58:44 +0300 Subject: [PATCH 3/3] Simplify elementTy --- fixed-vector/Data/Vector/Fixed/Internal.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fixed-vector/Data/Vector/Fixed/Internal.hs b/fixed-vector/Data/Vector/Fixed/Internal.hs index d73968b..19e827b 100644 --- a/fixed-vector/Data/Vector/Fixed/Internal.hs +++ b/fixed-vector/Data/Vector/Fixed/Internal.hs @@ -273,9 +273,7 @@ elementTy :: forall k v a f proxy. (Vector v a, Index (Peano k) (Dim v), Functor => proxy k -> (a -> f a) -> (v a -> f (v a)) {-# INLINE elementTy #-} elementTy _ f v - = fmap vector - $ inspect (C.cvec v) - (C.lensF (proxy# @(Peano k)) f construct) + = inspect v (C.lensF (proxy# @(Peano k)) f construct) -- | Left fold over vector foldl :: Vector v a => (b -> a -> b) -> b -> v a -> b