[project @ 2000-01-30 10:25:27 by simonmar]
Change the type of catch# to
catch# :: (W# -> (# W#, a #))
-> (b -> W# -> (# W#, a #))
-> W# -> (# W# , a #)
where W# == State# RealWorld. In other words, make it explicit that
catch# is an IO operation and takes IO operations as arguments. The
previous type was too general, and resulted in catch# having the wrong
arity which could cause mis-optimisations.
The down side is that we now have to pass the state token around
inside the primop instead of doing it in the Haskell wrapper, and
raiseAsync() also has to build a PAP(handler,exception,realworld)
instead of just a PAP(handler,exception) when it invokes a handler as
a result of an async exception.
I also added some optimisations to (un)?blockAsyncException to not
grow the stack if it can be avoided, such as when we're about to block
async exceptions and there's a blockAsyncExceptions_ret stack frame on
the top of the stack.