ghci should use UserInterrupt exception from base, not private Interrupted exception
In response to the user pressing control-C, ghci uses an exception Interrupted :: GhcException
from the module Panic
.
Testsuites designed to be used in ghci (like QuickCheck) need to distinguish this interrupted exception from other exceptions which indicate an actual failing test.
Since this exception is only defined in the ghc package, this means that packages such as QuickCheck are forced to depend on the ghc package. This causes no end of problems.
The solution is for ghci to use the (newer) exception from Control.Exception
, UserInterrupt :: AsyncException
. Then packages such as QC do not need to depend on the ghc package and everyone will be happy.
The QC developers indicate they're happy to switch it. They just need to know which version it will be fixed in, so they can write the appropriate CPP magic to do the right thing based on the ghc version.
Trac metadata
Trac field | Value |
---|---|
Version | 6.12.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |