[Haskell-cafe] data-accessor-template- breaks cabal-install with ghc-6.12

John Lato jwlato at gmail.com
Fri Feb 12 22:30:20 EST 2010


I've recently run across an odd situation.  I have a brand new install
of GHC-6.12.1 (just did a fresh install of OSX 10.6), and am
reinstalling some libraries.  I've run into an unusual problem.  I'm
not sure if this would be considered a cabal bug or not, but I don't
think it's a good situation.

data-accessor-template depends upon template-haskell (>=2.2 && <2.4),
unless built with the flag -ftemplate_2_4, in which case it depends
upon template-haskell 2.4 (appropriate for ghc-6.12.1).  The relevant
lines of the .cabal file are:

Flag template_2_4
  description: Adapt to TemplateHaskell version of GHC-6.12
  default: False

  If flag(template_2_4)
    Hs-Source-Dirs: src-5
    Build-Depends:  template-haskell >=2.4 && <2.5
    Hs-Source-Dirs: src-3
    Build-Depends:  template-haskell >=2.2 && <2.4

I can install data-accessor-template when the template_2_4 flag is
used, but then when I try to install a package that depends upon
data-accessor-template cabal-install calculates the template-haskell
>=2.2 && <2.4 dependency and attempts to fulfill it.  Which fails at
packedstring (can't find Data.Data in a hidden base package).

I've included output from attempting to install Chart that
demonstrates the behavior.  Note that even though cabal-install sees
data-accessor-template as installed, it attempts to reinstall it.

John-Latos-MacBook:packages johnlato$ cabal install -v -O Chart

In order, the following would be installed:
packedstring- (new package)
template-haskell- (new version)
data-accessor-template- (reinstall) changes: template-haskell-
Chart-0.12 (new package)

This affects everything down the dependency tree, notably Chart,
criterion, and yi.

I can work around this by specifying a previous version of
data-accessor-template, but unfortunately I don't know how to address
the real problem.


More information about the Haskell-Cafe mailing list