QC dependency on the ghc package

Duncan Coutts duncan.coutts at googlemail.com
Wed May 26 12:18:32 EDT 2010

QuickCheck developers,

We noticed that QC is currently being forced to depend on the ghc api
package so that it can get access to the exception type that ghci
generates in response to the user pressing control-C. 

(See Test/QuickCheck/Exception.hs, the stuff with GHC_INTERRUPT)

It is rather annoying that QC depends on the ghc api package. In
particular it means Cabal effectively cannot use QC for its own
testsuite. This is because QC depends on the ghc package, which in turn
depends on Cabal. So if we want to link a new Cabal lib with QC, then we
also end up with an old Cabal lib linked in too and things start going
wrong. Generally, things depending on the ghc package unnecessarily is a
pain for sane package management (especially for libs as commonly used
as QC).

The solution is that Simon will switch ghci to use the UserInterrupt
exception from Control.Exception.

We should change QC to use yet more CPP so that with the suitable ghc
version it no longer imports Panic(GhcException(Interrupted)) and does
not depend on the ghc api package.


More information about the QuickCheck mailing list