[GHC] #5902: Cannot tell from an exception handler whether the exception was asynchronous
GHC
ghc-devs at haskell.org
Wed Jul 17 22:00:47 CEST 2013
#5902: Cannot tell from an exception handler whether the exception was
asynchronous
-------------------------------------+------------------------------------
Reporter: simonmar | Owner: simonmar
Type: bug | Status: new
Priority: normal | Milestone: 7.8.1
Component: Compiler | Version: 7.4.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by simonmar):
Now I think about it, this isn't such a bad idea. Unfortunately we can't
implement `newCatch`, because the async exception might have been re-
thrown (say by a `finally`) inside the io. So the best you can do is
recognise an async exception by its type - i.e. if it is an child of
`AsyncException` then it's async, otherwise not. But that's good, because
it means we don't have to change the RTS or primops.
Then there's the question of whether restarting the io is safe. It
probably is; as Simon pointed out, the io inside `unsafePerformIO` is
supposed to be a benign side-effect, so we ought to be able to repeat it.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/5902#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list