[project @ 1998-06-05 11:16:08 by simonm]
[ghc-hetmet.git] / ghc / tests / concurrent / should_run / conc004.hs
1 module Main where
2
3 -- Test thread creation.
4 -- (from: Einar Wolfgang Karlsen <ewk@Informatik.Uni-Bremen.DE>)
5
6 import Concurrent
7
8 main :: IO ()
9 main = spawner forkIO 1000000
10
11 spawner :: (IO () -> IO ()) -> Int -> IO ()
12 spawner c 0 = print "done"
13 spawner c n = do { c (spawner c (n-1)); return ()}