On Thu, Mar 10, 2011 at 6:04 PM, John D. Ramsdell <[email protected]> wrote:
> At the code level, all that is done is replace one map call with a
> parallelized version of map that I saw in one of your papers:
>
> #if defined HAVE_PAR
> parMap :: (a -> b) -> [a] -> [b]
> parMap _ [] = []

Opps.  Please delete the #if line.  In the actual code, I have
preserved the ability to compile CPSA using GHC 6.8 by using the C
preprocessor as follows:

#if defined HAVE_PAR

parMap :: (a -> b) -> [a] -> [b]
parMap _ [] = []
parMap f (x:xs) =
    par y (pseq ys (y:ys))
    where
      y = f x
      ys = parMap f xs

#else

parMap :: (a -> b) -> [a] -> [b]
parMap = map

#endif

John

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to