
#495: feature request: top-level if statements ----------------------------+----------------------------------------------- Reporter: awick | Owner: Type: enhancement | Status: closed Priority: normal | Milestone: Component: Cabal library | Version: 1.6.0.1 Severity: normal | Resolution: worksforme Keywords: | Difficulty: unknown Ghcversion: 6.10.1 | Platform: ----------------------------+----------------------------------------------- Comment (by awick): Actually, the only thing that's a minor issue is that flags don't seem to work properly this way. For example: {{{ executable foo build-depends: base, other-library if !flag(Foo) buildable: False }}} When I run cabal-install, it seems to require 'other-library' to be around even if Foo is not set. Moving the dependency: {{{ executable foo build-depends: base if !flag(Foo) buildable: False build-depends: other-library }}} doesn't seem to help. On the other hand, if you use "os(foo)", it works as I'd expect (other-library isn't required). -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/495#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects