[Hackage] #89: Sharing of object files between executable builds?

Hackage trac at galois.com
Sun Jul 5 02:23:08 EDT 2009

#89: Sharing of object files between executable builds?
  Reporter:  bjorn at bringert.net  |        Owner:  blackh   
      Type:  enhancement         |       Status:  assigned 
  Priority:  normal              |    Milestone:  Cabal-1.8
 Component:  Cabal library       |      Version:           
  Severity:  normal              |   Resolution:           
  Keywords:                      |   Difficulty:  normal   
Ghcversion:  6.4.2               |     Platform:  Linux    
Changes (by blackh):

  * status:  new => assigned
  * owner:  => blackh


 maltem, the work on ticket 89 is completed and checked except for some
 minor bits that are not quite finished.

 However, the error message is telling lies. The minimum version for the
 ticket 89 feature to be activated is actually 1.7.1.  (I assume the reason
 for this little porkie is that Duncan is intending 1.8 to be the version
 when it is released.)  So, to test it, use:

 cabal-version: >= 1.7.1

 Another point is that GHC will always look in the build directory in
 preference to using a library, so if you want to make it treat your
 internally defined library just like an external one (and therefore build
 each source file only one), you have to use

 hs-source-dirs: programs

 or similar on either your library or executable definition or both with
 different directory names, to keep the source files separate.

 There's an example of this in

 - Stephen Blackheath

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

More information about the cabal-devel mailing list