Ticket #4100 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

ghci should use UserInterrupt exception from base, not private Interrupted exception

Reported by: duncan Owned by: simonmar
Priority: normal Milestone:
Component: Compiler Version: 6.12.2
Keywords: Cc: nicsma@…, michal.palka@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

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.

Change History

Changed 3 years ago by NickSmallbone

  • cc nicsma@… added

Changed 3 years ago by michal.palka

  • cc michal.palka@… added

Changed 3 years ago by simonmar

  • owner set to simonmar

Changed 3 years ago by simonmar

  • status changed from new to closed
  • resolution set to fixed

Done:

Wed Jun  2 01:23:45 PDT 2010  Simon Marlow <marlowsd@gmail.com>
  * Use UserInterrupt rather than our own Interrupted exception (#4100)
Note: See TracTickets for help on using tickets.