Previously we assumed that every Python Exception would eventually be
re-released into Python, which is not correct. To ensure correct
behavior in the case where Haskell handles the exception, we must use
ForeignPtrs
Also add more tests for various edge cases in exception propagation.
Finally, improve handling of asynchronous exceptions, ensuring that they are masked in most hyphen code and properly handled (previously they would cause a crash if they arrived in hyphen code, although they were correctly handled if they arrived in user Haskell code...)
Previously we assumed that every Python Exception would eventually be re-released into Python, which is not correct. To ensure correct behavior in the case where Haskell handles the exception, we must use ForeignPtrs
Also add more tests for various edge cases in exception propagation.
Finally, improve handling of asynchronous exceptions, ensuring that they are masked in most hyphen code and properly handled (previously they would cause a crash if they arrived in hyphen code, although they were correctly handled if they arrived in user Haskell code...)