A means of testing whether code is in blocked or unblocked mode
There is currently no way for code, e.g. in a library, to test whether it is running in a blocked or unblocked state. The only uses I have for this is to implement work arounds for the problem with throwTo & block (ticket 1047) or to write forkInheritIO in terms of forkIO and forkBlockedIO (from ticket 1048).
areExceptionsBlocked :: IO Bool -- True in scope of block, false in scope of unblock