From 7f444b3906671883a8d913be070438eb1cc662e6 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 9 Apr 2026 21:00:53 +0200 Subject: [PATCH] Added export to mapMaybeM --- src/Data/Vector/Unboxing.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Data/Vector/Unboxing.hs b/src/Data/Vector/Unboxing.hs index 3b7d300..6fa3104 100644 --- a/src/Data/Vector/Unboxing.hs +++ b/src/Data/Vector/Unboxing.hs @@ -53,7 +53,7 @@ module Data.Vector.Unboxing ,unzip,unzip3,unzip4,unzip5,unzip6 -- * Working with predicates -- ** Filtering - ,filter,ifilter,uniq,mapMaybe,imapMaybe,filterM,takeWhile,dropWhile + ,filter,ifilter,uniq,mapMaybe,imapMaybe,filterM,mapMaybeM,takeWhile,dropWhile -- ** Partitioning ,partition,unstablePartition,span,break -- ** Searching @@ -523,6 +523,10 @@ filterM :: (Monad m, Unboxable a) => (a -> m Bool) -> Vector a -> m (Vector a) filterM = G.filterM {-# INLINE filterM #-} +mapMaybeM :: (Monad m, Unboxable a, Unboxable b) => (a -> m (Maybe b)) -> Vector a -> m (Vector b) +mapMaybeM = G.mapMaybeM +{-# INLINE mapMaybeM #-} + takeWhile :: (Unboxable a) => (a -> Bool) -> Vector a -> Vector a takeWhile = G.takeWhile {-# INLINE takeWhile #-}