>
Consider the case of StateT s IO: your exception handler can get an `s` known when the `catch` is evaluated, but can never know the *current* value of the `s` when the exception is thrown --- exceptions do not know how to carry state around like that, and in the most general case can't know how. There are various frameworks that attempt to add this kind of functionality, such as MonadCatch and MonadBaseControl; but it's fairly tricky even at the best of times.
Apologies, but I couldn't understand the example. In an exception where it's not even possible to know the stack trace easily, I don't expect to know the state of the computation. It's an exception -- it is alright if it doesn't have the state. But at least allow me to catch the exception in MonadIO.
And this brings me to my original question. What do I need to do to catch an exception in spock's ActionT? I thought I didn't understand something earlier. But now it seems that I have hit a hairy part of Haskell.