on master help sign in
Updated type signature of `concatMapWith` to remove explicit forall.
9d653d0Ahmed Zaheer Dadarkar
Changelog.md+2
@@ -4,6 +4,8 @@
4
4
5* Change the signature of `foldlM'` to make the initial value of the
5* Change the signature of `foldlM'` to make the initial value of the
6 accumulator monadic.
6 accumulator monadic.
7+* Change the signature of `concatMapWith` to ensure that it can be
8+ used with a wide variety of combining functions.
7
9
8### Bug Fixes
10### Bug Fixes
9
11
src/Streamly/Internal/Data/Stream/StreamK/Type.hs+2−2
@@ -1008,7 +1008,7 @@ apSerialDiscardSnd fstream stream = go1 fstream
1008{-# INLINE bindWith #-}
1008{-# INLINE bindWith #-}
1009bindWith
1009bindWith
1010 :: IsStream t
1010 :: IsStream t
1011− => (forall c. t m c -> t m c -> t m c)
1011+ => (t m b -> t m b -> t m b)
1012 -> t m a
1012 -> t m a
1013 -> (a -> t m b)
1013 -> (a -> t m b)
1014 -> t m b
1014 -> t m b
@@ -1039,7 +1039,7 @@ bindWith par m1 f = go m1
1039{-# INLINE concatMapBy #-}
1039{-# INLINE concatMapBy #-}
1040concatMapBy
1040concatMapBy
1041 :: IsStream t
1041 :: IsStream t
1042− => (forall c. t m c -> t m c -> t m c)
1042+ => (t m b -> t m b -> t m b)
1043 -> (a -> t m b)
1043 -> (a -> t m b)
1044 -> t m a
1044 -> t m a
1045 -> t m b
1045 -> t m b
src/Streamly/Internal/Prelude.hs+3−3
@@ -3036,7 +3036,7 @@ mergeAsyncByM f m1 m2 = fromStreamD $
3036{-# INLINE concatMapWith #-}
3036{-# INLINE concatMapWith #-}
3037concatMapWith
3037concatMapWith
3038 :: IsStream t
3038 :: IsStream t
3039− => (forall c. t m c -> t m c -> t m c)
3039+ => (t m b -> t m b -> t m b)
3040 -> (a -> t m b)
3040 -> (a -> t m b)
3041 -> t m a
3041 -> t m a
3042 -> t m b
3042 -> t m b
@@ -3353,7 +3353,7 @@ interposeSuffix x unf str =
3353{-# INLINE concatMapIterateWith #-}
3353{-# INLINE concatMapIterateWith #-}
3354concatMapIterateWith
3354concatMapIterateWith
3355 :: IsStream t
3355 :: IsStream t
3356− => (forall c. t m c -> t m c -> t m c)
3356+ => (t m a -> t m a -> t m a)
3357 -> (a -> t m a)
3357 -> (a -> t m a)
3358 -> t m a
3358 -> t m a
3359 -> t m a
3359 -> t m a
@@ -3388,7 +3388,7 @@ concatMapIterateWith combine f = concatMapWith combine go
3388{-# INLINE concatMapTreeWith #-}
3388{-# INLINE concatMapTreeWith #-}
3389concatMapTreeWith
3389concatMapTreeWith
3390 :: IsStream t
3390 :: IsStream t
3391− => (forall c. t m c -> t m c -> t m c)
3391+ => (t m (Either a b) -> t m (Either a b) -> t m (Either a b))
3392 -> (a -> t m (Either a b))
3392 -> (a -> t m (Either a b))
3393 -> t m (Either a b) -- Should be t m a?
3393 -> t m (Either a b) -- Should be t m a?
3394 -> t m (Either a b)
3394 -> t m (Either a b)