Flag auto-detection

Roman Cheplyaka roma at ro-che.info
Fri Jun 8 12:33:35 CEST 2012


The Cabal user's guide says:

  By default, Cabal will first try to satisfy dependencies with the
  default flag value and then, if that is not possible, with the negated
  value.

Does this not hold for the extra-libraries? In a cabal file I have

    Flag docs-only
        default: False
    Library
        if ! flag(docs-only)
            extra-libraries: ole32 oleaut32

The command

    % cabal configure -fdocs-only

completes successfully, while simple

    % cabal configure

fails due to the unmet dependencies. Why doesn't Cabal flip the flag
when it can't find those libraries?

-- 
Roman I. Cheplyaka :: http://ro-che.info/



More information about the cabal-devel mailing list