[Hackage] #401: better support for multi-valued configuration flags

#401: better support for multi-valued configuration flags ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: Cabal library | Version: Severity: normal | Keywords: Difficulty: normal | Ghcversion: 6.8.3 Platform: | ----------------------------+----------------------------------------------- For some packages one has to pick one of several mutually exclusive options. For example `yi` has a number of console or gui front ends. That can be expressed in terms of boolean flags but it's a little clumsy. We should consider adding some syntactic sugar. Currently it can be expressed by excluding the choice of picking none: {{{ if flag(gtk) ... if flag(vty) ... if flag(coca) && os(osx) ... if ! ( flag(gtk) || flag(vty) || (flag(coca) && os(osx)) ) buildable: false }}} That doesn't exclude the possibility of picking two options of course. In some cases we would want the options to be mutually exclusive and in others we would want to simply force the choice of one option, but multiple options might be possible. So the question is what kind of syntactic sugar would we like, how would it translate and how would it be exposed to package managers. eg: {{{ flag gui values: gtk, vty, coca if flag(gui==gtk) ... etc }}} and it'd translate into boolean choices that forced a choice of one flag being true and the others false. Needs some thought. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/401 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#401: better support for multi-valued configuration flags ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Cabal-2.0 Component: Cabal library | Version: Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.8.3 | Platform: ----------------------------+----------------------------------------------- Changes (by duncan): * milestone: => Cabal-2.0 -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/401#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage