swh:1:snp:36f6853f4c867e5bf757ecdd45b41d7d9a561f40
Raw File
Tip revision: be45643e72b1970bb89421f0dce429ea9c7a5ada authored by Simon Marlow on 13 June 2014, 11:06:37 UTC
fix for compilation with GHC 7.8
Tip revision: be45643
parlist.hs
module ParList where

import Control.Parallel.Strategies hiding (parList, evalList)

-- <<evalList
evalList :: Strategy a -> Strategy [a]
evalList strat []     = return []
evalList strat (x:xs) = do
  x'  <- strat x
  xs' <- evalList strat xs
  return (x':xs')
-- >>

-- <<parList
parList :: Strategy a -> Strategy [a]
parList strat = evalList (rparWith strat)
-- >>
back to top