import GHC.TopHandler ( reportStackOverflow, reportError )
import GHC.IOBase ( IO(..) )
import GHC.IOBase ( unsafeInterleaveIO )
-import GHC.IOBase ( newIORef, readIORef, writeIORef )
+import GHC.IOBase ( newIORef, readIORef, writeIORef )
import GHC.Base
import Foreign.StablePtr
AsyncException ThreadKilled -> return ()
-- report all others:
- AsyncException StackOverflow -> reportStackOverflow False
- other -> reportError False other
+ AsyncException StackOverflow -> reportStackOverflow
+ other -> reportError other
#endif /* __GLASGOW_HASKELL__ */
> forkChild :: IO () -> IO ()
> forkChild io = do
> mvar <- newEmptyMVar
-> forkIO (io `finally` putMVar mvar ())
> childs <- takeMVar children
> putMVar children (mvar:childs)
+> forkIO (io `finally` putMVar mvar ())
>
> main =
> later waitForChildren $