on master help sign in
Fix build for older versions of GHC
b90107fHarendra Kumar
benchmark/lib/Streamly/Benchmark/Prelude.hs+1−1
@@ -264,7 +264,7 @@ sourceFromFoldableM :: (S.IsStream t, S.MonadAsync m) => Int -> Int -> t m Int
264sourceFromFoldableM value n = S.fromFoldableM (P.fmap return [n..n+value])
264sourceFromFoldableM value n = S.fromFoldableM (P.fmap return [n..n+value])
265
265
266{-# INLINE absTimes #-}
266{-# INLINE absTimes #-}
267−absTimes :: (S.IsStream t, S.MonadAsync m)
267+absTimes :: (S.IsStream t, S.MonadAsync m, P.Functor (t m))
268 => Int -> Int -> t m AbsTime
268 => Int -> Int -> t m AbsTime
269absTimes value _ = S.take value $ Internal.absTimes
269absTimes value _ = S.take value $ Internal.absTimes
270
270
src/Streamly/Internal/Data/Fold.hs+13−2
@@ -215,6 +215,9 @@ import Control.Monad.IO.Class (MonadIO(..))
215import Data.Functor.Identity (Identity(..))
215import Data.Functor.Identity (Identity(..))
216import Data.Int (Int64)
216import Data.Int (Int64)
217import Data.Map.Strict (Map)
217import Data.Map.Strict (Map)
218+#if __GLASGOW_HASKELL__ < 804
219+import Data.Semigroup (Semigroup((<>)))
220+#endif
218
221
219import Prelude
222import Prelude
220 hiding (filter, drop, dropWhile, take, takeWhile, zipWith,
223 hiding (filter, drop, dropWhile, take, takeWhile, zipWith,
@@ -629,7 +632,11 @@ sconcat i = Fold (\x a -> return $ x <> a) (return i) return
629--
632--
630-- @since 0.7.0
633-- @since 0.7.0
631{-# INLINE mconcat #-}
634{-# INLINE mconcat #-}
632−mconcat :: (Monad m, Monoid a) => Fold m a a
635+mconcat :: (Monad m, Monoid a
636+#if __GLASGOW_HASKELL__ < 804
637+ , Semigroup a
638+#endif
639+ ) => Fold m a a
633mconcat = sconcat mempty
640mconcat = sconcat mempty
634
641
635-- |
642-- |
@@ -642,7 +649,11 @@ mconcat = sconcat mempty
642--
649--
643-- @since 0.7.0
650-- @since 0.7.0
644{-# INLINABLE foldMap #-}
651{-# INLINABLE foldMap #-}
645−foldMap :: (Monad m, Monoid b) => (a -> b) -> Fold m a b
652+foldMap :: (Monad m, Monoid b
653+#if __GLASGOW_HASKELL__ < 804
654+ , Semigroup b
655+#endif
656+ ) => (a -> b) -> Fold m a b
646foldMap f = lmap f mconcat
657foldMap f = lmap f mconcat
647
658
648-- |
659-- |