on master help sign in
Remove the Monad constraint in mergeBy
1d100c9Adithya Kumar
src/Streamly/Internal/Data/Stream/IsStream/Expand.hs+1−4
@@ -1,5 +1,3 @@
1−{-# OPTIONS_GHC -Wno-redundant-constraints #-}
2−
3-- |
1-- |
4-- Module : Streamly.Internal.Data.Stream.IsStream.Expand
2-- Module : Streamly.Internal.Data.Stream.IsStream.Expand
5-- Copyright : (c) 2017 Composewell Technologies
3-- Copyright : (c) 2017 Composewell Technologies
@@ -709,8 +707,7 @@ zipAsyncWith f = zipAsyncWithM (\a b -> return (f a b))
709--
707--
710-- @since 0.6.0
708-- @since 0.6.0
711{-# INLINE mergeBy #-}
709{-# INLINE mergeBy #-}
712−mergeBy ::
713− (IsStream t, Monad m) => (a -> a -> Ordering) -> t m a -> t m a -> t m a
710+mergeBy :: IsStream t => (a -> a -> Ordering) -> t m a -> t m a -> t m a
714mergeBy f m1 m2 = fromStream $ K.mergeBy f (toStream m1) (toStream m2)
711mergeBy f m1 m2 = fromStream $ K.mergeBy f (toStream m1) (toStream m2)
715
712
716-- | Like 'mergeBy' but with a monadic comparison function.
713-- | Like 'mergeBy' but with a monadic comparison function.