summaryrefslogtreecommitdiff
path: root/testsuite/tests/rts/T7636.hs
blob: 9e3dbd69d2f042f039f4b5dc46b2c17ede588305 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import GHC.Conc.Sync
import System.Environment

test n = atomically $ f [1..n]
 where
  f [] = retry
  f (x:xs) = do
    ys <- f xs
    return (x:ys)

main = do
  [n] <- getArgs
  test (read n)