http://hackage.haskell.org/trac/hackage/ticket/227

       One problem is that not all build-tools correspond to haskell
       packages. Some do some don't. We have a hard coded list of them
       at the moment (which can be extended in Setup.hs files) so we
       could extend that with what haskell package if any the tools
       correspond to. Any better suggestions to make it a tad more
       generic?

That list seems to be in Distribution/Simple/Program.hs, in case anyone else is looking for it. Encoded information includes: dependency name, program name (if different from dependency),
option to get version info and code to extract it (with one apparently
very special case being hsc2hs).

Btw, most of the version extraction code looks like a regular expression match - wouldn't that make the specification easier
(and turn the comments into part of the spec)?

If anyone has a godd suggestion I'm happy to hear it. Otherwise we can
just add a Maybe Dependency to the Program type to indicate that some
build tools have a corresponding haskell package.

I'm not sure what you're suggesting there (currently even those
tools that can be built with Cabal do not register with Cabal), but here are my suggestions:

1. Haskell tools should register with Cabal, whether built with it
(such as Alex, Happy, ..) or not (such as GHC, ..). That registration should include any build-relevant information
   (versions/variants, ..).

2. When checking a build-tools dependency, Cabal checks
   (a) whether the tool is registered with Cabal
   (b) whether the tool is registered with the system installation manager
   (c) whether the tool can be found by other means (configure,
           built-in rules, ..)

In other words, make tools look like packages (lifetime dependency
management, not just build support), and make system packages look like Cabal packages (Cabal as the interface to native managers), using special treatment only if absolutely necessary. I thought those suggestions
were clear from my earlier messages?-)

Claus

http://www.haskell.org/pipermail/haskell-cafe/2008-May/043368.html
http://www.haskell.org/pipermail/haskell-cafe/2008-June/043977.html
http://www.haskell.org/pipermail/haskell-cafe/2008-June/043910.html


_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to