@@ -47,7 +47,9 @@ module Streamly.Internal.Data.Array
49import Prelude hiding (foldr, length, read)
49import Prelude hiding (foldr, length, read)
50+#if !MIN_VERSION_primitive(0,7,1)
50import Control.DeepSeq (NFData(..))
51import Control.DeepSeq (NFData(..))
51import Control.Monad (when)
53import Control.Monad (when)
52import Control.Monad.IO.Class (liftIO, MonadIO)
54import Control.Monad.IO.Class (liftIO, MonadIO)
53import GHC.IO (unsafePerformIO)
55import GHC.IO (unsafePerformIO)
@@ -160,9 +162,11 @@ fromListN n xs = unsafePerformIO $ fromStreamDN n $ D.fromList xs
160fromList :: [a] -> Array a
162fromList :: [a] -> Array a
161fromList xs = unsafePerformIO $ fromStreamD $ D.fromList xs
163fromList xs = unsafePerformIO $ fromStreamD $ D.fromList xs
165+#if !MIN_VERSION_primitive(0,7,1)
163instance NFData a => NFData (Array a) where
166instance NFData a => NFData (Array a) where
164 {-# INLINE rnf #-}
167 {-# INLINE rnf #-}
165 rnf = foldl' (\_ x -> rnf x) ()
168 rnf = foldl' (\_ x -> rnf x) ()
167{-# INLINE fromStreamN #-}
171{-# INLINE fromStreamN #-}
168fromStreamN :: MonadIO m => Int -> SerialT m a -> m (Array a)
172fromStreamN :: MonadIO m => Int -> SerialT m a -> m (Array a)