[Haskell-cafe] Cabal and more than one version

Sean Leather leather at cs.uu.nl
Tue Feb 3 04:38:14 EST 2009

> Presumably the template-haskell-2.3 package does not build with ghc-6.8
> but fails to correctly specify the version of base or ghc that it
> requires. If it did then we would have a better chance to get this
> right.

Yes, this is certainly an issue in general with template-haskell-2.3. How do
we fix this?

> Another possible workaround...
> If you avoid using the flag hack then the solver would not have to
> choose so early which version of template-haskell to commit to and it
> would be able to pick the right version later. Though then you need an
> alternative method of finding which version of template-haskell you
> ended up with. You could do it with some custom code in Setup.hs.

I don't mind using a different approach. How do I detect which version of
template-haskell I'm using in Setup.lhs that is backwords compatible to
Cabal 1.2? I would like to support both template-haskell-2.2 and -2.3 by
deriving EMGM type representations for it, but the later has the 'Loc'
datatype. So, I'm currently using the CPP flag to determine whether 'Loc' is
available or not:

**-- This type is only provided in template-haskell-2.3 (included with GHC 6.10)
**-- and up.
*$(derive ''Loc)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090203/44eb7102/attachment.htm

More information about the Haskell-Cafe mailing list