Add back the Monad constraint in mergeBy

This commit is contained in:
Adithya Kumar 2021-11-16 12:44:55 +05:30 committed by Adithya Kumar
parent 05360d2a64
commit 13f361a606

View File

@ -707,7 +707,8 @@ zipAsyncWith f = zipAsyncWithM (\a b -> return (f a b))
-- --
-- @since 0.6.0 -- @since 0.6.0
{-# INLINE mergeBy #-} {-# INLINE mergeBy #-}
mergeBy :: IsStream t => (a -> a -> Ordering) -> t m a -> t m a -> t m a mergeBy ::
(IsStream t, Monad m) => (a -> a -> Ordering) -> t m a -> t m a -> t m a
mergeBy f m1 m2 = fromStream $ K.mergeBy f (toStream m1) (toStream m2) mergeBy f m1 m2 = fromStream $ K.mergeBy f (toStream m1) (toStream m2)
-- | Like 'mergeBy' but with a monadic comparison function. -- | Like 'mergeBy' but with a monadic comparison function.