Commit 53565e8f authored by Simon Marlow's avatar Simon Marlow
Browse files

add test from #799

parent 1ce65803
TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
setTestOpts(only_ways(['threaded1', 'threaded2']));
test('par001', normal, compile_and_run, [''])
import Control.Parallel
parfib 0 = return 1
parfib 1 = return 1
parfib n = do
n1 <- parfib (n - 1)
n2 <- parfib (n - 2)
n3 <- (n1 `par` (n2 `seq` (return (n1 + n2 + 1))))
return n3
main = do x <- parfib 30; print x
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment