move QuickCheck.All to separate package (because of TemplateHaskell)

Nick Smallbone nick.smallbone at gmail.com
Mon Jun 18 16:07:41 BST 2012


Hi Henning,

This flag is supposed to be disabled automatically by Cabal whenever
you don't have the template-haskell package installed; the user isn't
supposed to set it themselves. Thus the intended way to assert that
you depend on Test.QuickCheck.All is just to depend on the
template-haskell package.

We use the same mechanism to decide which version of the base package
to depend on (since we also support old versions of GHC, and Hugs),
and there it works fine, without any user interaction. So I'm
surprised that you had trouble with it. The only thing I can guess is
that you might have had the template-haskell package installed even
though your GHC didn't support TH---I'll have to check if this is
supposed to happen.

Nick

On 27 April 2012 13:31, Henning Thielemann
<lemming at henning-thielemann.de> wrote:
>
> Hi,
>
> I had trouble compiling QuickCheck on a snapshot of GHC-7.5, because of its
> Template Haskell dependency. I found that there is a Cabal switch in order
> to disable Template Haskell. Unfortunately Hackage does not list Cabal
> flags. However when this flag is disabled the module QuickCheck.All is gone.
> How can a package that imports QuickCheck can assert that QuickCheck.All is
> present if it is needed?
>
> I think the only clean solution is to move QuickCheck.All to a separate
> package, say QuickCheckTH. This has many advantages: It makes clear for
> everyone that there is some QuickCheck stuff that depends on Template
> Haskell. It allows packages to explicitly depend on QuickCheck.All. It frees
> all packages from a Template Haskell dependency that import plain
> QuickCheck.
>
>
> Best,
> Henning
>
> _______________________________________________
> QuickCheck mailing list
> QuickCheck at projects.haskell.org
> http://projects.haskell.org/cgi-bin/mailman/listinfo/quickcheck



More information about the QuickCheck mailing list