Haskell multi-core for Windows

I read several tutorials on Haskell. However, I could not get the compiled application to work on a multi-core (I have Intel Quad Core) windows (32 bit) .

I have tried several things:

But no luck.

A compiled application only works on one core, only 100%.

Any ideas?

code:

import Control.Parallel
import Control.Monad
import Text.Printf

fib :: Int -> Int
fib 0 = 0
fib 1 = 1
fib n = l `pseq` r `pseq` l+r
    where
    l = fib (n-1)
    r = fib (n-2)

main = forM_ [0..350] $ \i ->
        printf "n=%d => %d\n" i (fib i)
+5
source share
2 answers

If vili is correct (I can’t verify, because I don’t have any MS boxes), this may be due to this error

+5

par pseq, , .

+6

All Articles