[Haskell-cafe] is there a way to patch the build-depends line of
a cabal file without breaking backwards compatibility?
Thomas Schilling
nominolo at googlemail.com
Mon Aug 20 13:37:28 EDT 2007
On 20 aug 2007, at 18.37, Thomas Hartman wrote:
>
> cafe, is there a way to patch the build-depends line of a cabal
> file without breaking backwards compatibility?
>
> I just patched HDBC head to compile under ghc 6.7. Unfortunately it
> now won't compile in 6.6.1.
>
> is there a way for build-depends to detect which version of ghc
> you're on?
>
> also I seem to recall that -fglasgow-exts was deprecated under 6.7.
> is there a better way to beat back the error message below than this?
>
The next release of Cabal (and the current HEAD) supports
conditionals to test for flags, os/arch, and implementation
(+version). Note that the problem isn't the GHC version, but the new
base version, in which the old base was split up into smaller
packages, so we have something roughly like: base-1.0 = base-2.0 +
bytestring + old-time + mtl. Take a look at the Cabal.cabal file,
how this is solved, atm. Please also note that this might not be the
best way to use the new features; as I suggested in another thread,
simulating base-1.0 on systems with base-2.0 is probably best handled
with a base.cabal file that imports base-2.0, old-time, etc. and re-
exports all imported modules to get a "virtual" base-1.0.
/ Thomas
More information about the Haskell-Cafe
mailing list