[darcs-users] [Haskell-cafe] Poll: Do you need to be able to build darcs from source on GHC 6.6?

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Wed Oct 29 10:29:19 UTC 2008


On Mon, 2008-10-27 at 19:24 -0700, Jason Dagit wrote:
> Hello,
> 
> I would like to find out if any darcs users who build from the source
> are still using ghc 6.6?

I'd just like to point out (again ;-) ) than it's not that hard to
support older platforms. The only constraint is that people not squeal
at the sight of bundled code. The bundling can be done in such a way
that it's not a maintenance burden, indeed it can remove the need to
maintain internal equivalents of external libs.

For example for an external package foo, we could put the latest stable
version of it in lib/foo and in the .cabal file say something like:

flag external-foo
  description: Use the external package foo, or the bundled version
  default: True

executable whatever

  if flag(external-foo)
    build-depends: foo == 1.*
  else
    hs-source-dirs: lib/foo


And I think that's it for simple external packages (though I've not
tested). For external packages that use C files or link to C code it
needs a bit more to bundle, but not a lot more. In either case the
internal code should be able to import the standard module name without
using any CPP.

The advantage of course is less cpp, a single API, and not having to
test two implementations (because the bundled impl is the same as the
external impl).

Duncan



More information about the darcs-users mailing list