6 -- Testing callbacks: the initial haskell thread calls out to C with
7 -- the address of a Haskell callback. The C function runs the callback
8 -- (in a new thread) and returns.
10 -- The stable pointer operation 'performIO' does the job of calling
11 -- the callback for us.
13 -- for an extra stressful test, the callback also does an explicit GC
14 -- to make sure that the original thread saved away its state
18 io <- makeStablePtr hello
19 _ccall_GC_ performIO io
25 putStr "hello world!\n"