@@ -47,7 +47,9 @@ module Streamly.Internal.Data.Array
4747where
4848
4949import Prelude hiding (foldr, length, read)
50+#if !MIN_VERSION_primitive(0,7,1)
5051import Control.DeepSeq (NFData(..))
52+#endif
5153import Control.Monad (when)
5254import Control.Monad.IO.Class (liftIO, MonadIO)
5355import GHC.IO (unsafePerformIO)
@@ -160,9 +162,11 @@ fromListN n xs = unsafePerformIO $ fromStreamDN n $ D.fromList xs
160162fromList :: [a] -> Array a
161163fromList xs = unsafePerformIO $ fromStreamD $ D.fromList xs
162164
165+#if !MIN_VERSION_primitive(0,7,1)
163166instance NFData a => NFData (Array a) where
164167 {-# INLINE rnf #-}
165168 rnf = foldl' (\_ x -> rnf x) ()
169+#endif
166170
167171{-# INLINE fromStreamN #-}
168172fromStreamN :: MonadIO m => Int -> SerialT m a -> m (Array a)