Search code examples
haskellvectorghccabalcompiler-flags

Specify ghc options at command line via cabal (cabal-install) without editing .cabal files of packages


When I install vector with:

cabal install vector

I get lots of SpecConstr limit warnings which would go away if I could specify -fspec-constr-count=SOMETHING-HIGHER.

  1. Would

    cabal install vector -fspec-constr-count=HIGH
    

    work?

  2. If X depends on vector, is there a way to say in X.cabal I depend on vector with preferably (in case X is not yet already installed) -fpsec-constr-count=HIGH?

  3. Is vector still maintained or is there now a more recommendable alternative?


Solution

  • You can pass extra options to programs run by Cabal by using --PROG-options=OPTS.

    cabal install vector --ghc-options=-fspec-constr-count=HIGH