[Hackage] #209: Implement "package()" configurations predicate

Hackage trac at galois.com
Mon Jan 21 15:37:49 EST 2008


#209: Implement "package()" configurations predicate
----------------------------+-----------------------------------------------
  Reporter:  duncan         |        Owner:         
      Type:  enhancement    |       Status:  new    
  Priority:  normal         |    Milestone:         
 Component:  Cabal library  |      Version:  1.2.3.0
  Severity:  normal         |     Keywords:         
Difficulty:  normal         |   Ghcversion:  6.8.2  
  Platform:  Linux          |  
----------------------------+-----------------------------------------------
 We often have to write things like:
 {{{
 flag splitBase
   description: Choose the new smaller, split-up base package.
 library
   if flag(splitBase)
     build-depends: base >= 3, containers
   else
     build-depends: base < 3
 }}}

 Which is verbose and annoying. It would be nicer to say:
 {{{
 library
   build-depends: base
   if package(base >= 3)
     build-depends: containers
 }}}

 This is syntactic sugar only. It translates into the existing constructs
 so no new behaviour is being introduced. It would translate into:

 {{{
 flag _1

 library
   build-depends: base
   if flag(_1)
     build-depends: base >= 3
     build-depends: containers
   else
     build-depends: base < 3
 }}}

 It is described in more detail in this thread:
 http://www.haskell.org/pipermail/cabal-devel/2007-October/001189.html
 http://www.haskell.org/pipermail/cabal-devel/2007-November/001336.html

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


More information about the cabal-devel mailing list