@@ -17,6 +17,7 @@
1717--
1818module Streamly.Internal.Data.PrimArray
1919 ( PrimArray(..)
20+ , Prim(..)
2021
2122 , foldl'
2223 , foldr
@@ -149,9 +150,9 @@ fromListN n xs = unsafePerformIO $ fromStreamDN n $ D.fromList xs
149150fromList :: Prim a => [a] -> PrimArray a
150151fromList xs = unsafePerformIO $ fromStreamD $ D.fromList xs
151152
152−instance NFData (PrimArray a) where
153+instance Prim a => NFData (PrimArray a) where
153154 {-# INLINE rnf #-}
154− rnf = const ()
155+ rnf = foldl' (\_ _ -> ()) ()
155156
156157{-# INLINE fromStreamN #-}
157158fromStreamN :: (MonadIO m, Prim a) => Int -> SerialT m a -> m (PrimArray a)