@@ -11,6 +11,7 @@
11{-# LANGUAGE ViewPatterns #-}
11{-# LANGUAGE ViewPatterns #-}
12{-# LANGUAGE RankNTypes #-}
12{-# LANGUAGE RankNTypes #-}
13{-# LANGUAGE MagicHash #-}
13{-# LANGUAGE MagicHash #-}
14+{-# LANGUAGE TypeApplications #-}
15#include "inline.hs"
16#include "inline.hs"
@@ -255,6 +256,7 @@ import Control.Monad.Catch (MonadCatch)
255import Control.Monad.IO.Class (MonadIO(..))
256import Control.Monad.IO.Class (MonadIO(..))
256import Control.Monad.Trans (MonadTrans(lift))
257import Control.Monad.Trans (MonadTrans(lift))
257import Data.Bits (shiftR, shiftL, (.|.), (.&.))
258import Data.Bits (shiftR, shiftL, (.|.), (.&.))
259+import Data.Functor.Identity (Identity)
258import Data.Maybe (fromJust, isJust)
260import Data.Maybe (fromJust, isJust)
259import Data.Word (Word32)
261import Data.Word (Word32)
260import Foreign.Ptr (Ptr)
262import Foreign.Ptr (Ptr)
@@ -2353,7 +2355,7 @@ zipWithM f (Stream stepa ta) (Stream stepb tb) = Stream step (ta, tb, Nothing)
2353 Stop -> return Stop
2355 Stop -> return Stop
2355{-# RULES "zipWithM xs xs"
2357{-# RULES "zipWithM xs xs"
2356− forall f xs. zipWithM f xs xs = mapM (\x -> f x x) xs #-}
2358+ forall f xs. zipWithM @Identity f xs xs = mapM (\x -> f x x) xs #-}
2358{-# INLINE zipWith #-}
2360{-# INLINE zipWith #-}
2359zipWith :: Monad m => (a -> b -> c) -> Stream m a -> Stream m b -> Stream m c
2361zipWith :: Monad m => (a -> b -> c) -> Stream m a -> Stream m b -> Stream m c