{-# LANGUAGE KindSignatures, RankNTypes #-}
module Data.Sequence.Strategies where

import Control.Monad
import Control.Parallel.Strategies

import qualified Data.Sequence as S
import qualified Data.Foldable as F

{-# INLINE parSequence #-}
parSequence :: forall (t :: * -> *) a.
            (F.Foldable t, NFData a) =>
               Int
            -> t a
            -> Eval (S.Seq a)
parSequence n = liftM S.fromList . parListChunk n rdeepseq . F.toList
