@@ -45,8 +45,11 @@ import Control.DeepSeq (NFData(..))
45#if MIN_VERSION_deepseq(1,4,3)
45#if MIN_VERSION_deepseq(1,4,3)
46import Control.DeepSeq (NFData1(..))
46import Control.DeepSeq (NFData1(..))
48+import Data.Coerce (Coercible, coerce)
49+import Data.Foldable (Foldable(foldl'), fold)
48−import Data.Functor.Identity (Identity, runIdentity)
50+import Data.Functor.Identity (Identity(..), runIdentity)
49−import Data.Foldable (fold)
51+import Data.Maybe (fromMaybe)
52+import Data.Semigroup (Endo(..))
50#if __GLASGOW_HASKELL__ < 808
53#if __GLASGOW_HASKELL__ < 808
51import Data.Semigroup (Semigroup(..))
54import Data.Semigroup (Semigroup(..))
@@ -56,6 +59,7 @@ import Text.Read (Lexeme(Ident), lexP, parens, prec, readPrec, readListPrec,
56import Prelude hiding (map, repeat, zipWith)
59import Prelude hiding (map, repeat, zipWith)
58import Streamly.Internal.Data.Stream.StreamK (IsStream(..), Stream)
61import Streamly.Internal.Data.Stream.StreamK (IsStream(..), Stream)
62+import Streamly.Internal.Data.Strict (Maybe'(..), toMaybe)
59import Streamly.Internal.Data.SVar (MonadAsync)
63import Streamly.Internal.Data.SVar (MonadAsync)
61import qualified Streamly.Internal.Data.Stream.Prelude as P
65import qualified Streamly.Internal.Data.Stream.Prelude as P
@@ -70,6 +74,11 @@ import qualified Streamly.Internal.Data.Stream.StreamD as S
71#include "Instances.hs"
75#include "Instances.hs"
77+-- XXX move this to Streamly.Internal.Data.Coerce?
79+(#.) :: Coercible b c => (b -> c) -> (a -> b) -> (a -> c)
73-- | Like 'zipWith' but using a monadic zipping function.
82-- | Like 'zipWith' but using a monadic zipping function.
75-- @since 0.4.0
84-- @since 0.4.0