[Hackage] #326: Cabal should support Cabal-version-dependent Setup.hs

Hackage trac at galois.com
Tue Aug 19 11:49:10 EDT 2008


#326: Cabal should support Cabal-version-dependent Setup.hs
----------------------------+-----------------------------------------------
  Reporter:  claus          |        Owner:         
      Type:  enhancement    |       Status:  new    
  Priority:  normal         |    Milestone:         
 Component:  Cabal library  |      Version:  1.2.3.0
  Severity:  normal         |   Resolution:         
  Keywords:                 |   Difficulty:  normal 
Ghcversion:  6.8.2          |     Platform:         
----------------------------+-----------------------------------------------
Comment (by claus):

 > Cabal makes them available while building, a macro for testing the
 version of each dependency. It's not just cabal-install, it's done in the
 Cabal lib. I'm not sure what you're suggesting as an alternative, that we
 install the .h files too? I guess that would let packages that build
 without using Cabal to use the version macros of packages that were built
 with Cabal. Is that what you mean? Is that a major advantage?

 Yes, I had assumed that the .h files would be installed with the package.
 Then it would be available to all importers, anytime, not just during
 building with Cabal. One might think that all Haskell code should be build
 via Cabal, always, but that isn't true, and `Setup.hs` seems to be our
 first exception to that scheme.

 > The problem with using these macros for compiling Setup.hs is that that
 would only help cabal-install and would actively hinder everyone else.
 `runghc Setup` would stop working.

 I don't understand? If I have a pragma in `Setup.hs` that enables CPP, and
 there is a macro giving the version number for the installed cabal package
 that `Setup.hs` is using, why would `runhaskell Setup` not work?

-- 
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/326#comment:8>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects


More information about the cabal-devel mailing list