[Haskell-cafe] ANNOUNCE: Extensible and Modular Generics for theMasses: emgm-0.3

Sean Leather leather at cs.uu.nl
Tue Mar 3 08:42:02 EST 2009


> Due to a problem with the template-haskell package and Cabal, you
>> cannot cabal-install the emgm package with GHC 6.8. However, take
>> heart! EMGM works very well with GHC 6.8. You merely have to download
>> the tar.gz package from Hackage yourself, build it, and install it.
>>
>
> I thought I had seen you mention a workaround for that issue, but
> if not, perhaps you might want to add your experience to
>
>   http://hackage.haskell.org/trac/hackage/ticket/326
>   Cabal should support Cabal-version-dependent Setup.hs
>

I thought I had worked around it, too. Unfortunately, I can only test once I
upload it to Hackage. Once I had, I discovered it wasn't fixed, yet. :-/

It's a problem with cabal-install/Cabal dealing with the lack of version
dependencies in template-haskell. Even though I have template-haskell >= 2.2
in my build-depends, cabal-install insists on trying to install 2.3, which
of course fails when you're using GHC 6.8.

Perhaps my problem cannot be fixed within the Setup.lhs? Maybe
cabal-install/Cabal is resolving dependencies solely based on the .cabal
file? I don't know.

There's a sketched hack-around at the end, using Setup.hs only to call to
> separate Setup-version.hs files, to circumvent Cabal API
> instabilities. Not nice, but perhaps better than to bypass Cabal
> alltogether? One would also have to pass parameters, and the
> Process API has changed in the meantime.., which I why I still
> think Cabal itself should simply be able to pick cabal-versioned
> configuration and setup files, if they exist.
>

I like the hack in that ticket. Very nice. ;) Though it apparently fails for
multiple versions of Cabal. I just checked my system and it produced:

$ ghc-pkg field Cabal version
version: 1.6.0.1
version: 1.6.0.2

Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090303/296718df/attachment.htm


More information about the Haskell-Cafe mailing list