Mercurial > hg > Members > toma > Jungle-haskell
changeset 26:02e7f2f50bdc
add test2
author | Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 04 Feb 2014 02:33:27 +0900 |
parents | efb4e880ac7f |
children | 0f4f017616cb |
files | test/runEvalTest/ParSum.hs |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/test/runEvalTest/ParSum.hs Mon Feb 03 20:38:07 2014 +0900 +++ b/test/runEvalTest/ParSum.hs Tue Feb 04 02:33:27 2014 +0900 @@ -37,6 +37,12 @@ then (return [a]) else do b <- test1 (i-1) return (a:b) + +test2 :: Eval (Integer, Integer) +test2 = rpar (sum' 0 num) >>= (\a -> + rpar (sum' num (num*2)) >>= (\b -> + return (a,b))) + test3 = do a <- rpar (sum' 0 num) b <- rpar (sum' num (if a < num then a else (num*2)))