@@ -19,7 +19,7 @@ import Control.Monad.IO.Class (MonadIO)
19import Prelude (Int, Bool, (+), ($), (==), (>), (.), Maybe(..), undefined)
19import Prelude (Int, Bool, (+), ($), (==), (>), (.), Maybe(..), undefined)
20import qualified Prelude as P
20import qualified Prelude as P
21#ifdef DEVBUILD
21#ifdef DEVBUILD
22−import qualified Data.Foldable as F
22+-- import qualified Data.Foldable as F
25import qualified Streamly as S hiding (foldMapWith, runStream)
25import qualified Streamly as S hiding (foldMapWith, runStream)
@@ -139,7 +139,10 @@ readInstance str =
139pureFoldl' :: MonadIO m => Stream Int -> m Int
139pureFoldl' :: MonadIO m => Stream Int -> m Int
140pureFoldl' = S.foldl' (+) 0 . S.unfold A.read
140pureFoldl' = S.foldl' (+) 0 . S.unfold A.read
142−#ifdef DEVBUILD
142+#if 0
143+-- PrimArray does not have a Foldable instance because it reuqires a Prim
144+-- constraint. Though it should be possible to make an instance in the same way
145+-- as we do in Memory.Array.
143{-# INLINE foldableFoldl' #-}
146{-# INLINE foldableFoldl' #-}
144foldableFoldl' :: Stream Int -> Int
147foldableFoldl' :: Stream Int -> Int
145foldableFoldl' = F.foldl' (+) 0
148foldableFoldl' = F.foldl' (+) 0