Friday, 24 February 2017

[Haskell-Cabal] pass specific options to build tools

Cabal provides options on command line to pass options to specific tools. For example, if we want to pass debug option to happy.

$ cabal build --happy-option=-d
 References:
$ cabal build --help

    --with-PROG=PATH    give the path to PROG
    --PROG-option=OPT   give an extra option to PROG (no need to quote options
                        containing spaces)
    --PROG-options=OPTS give extra options to PROG

The flags --with-PROG and --PROG-option(s) can be used with the following programs:
  alex ar c2hs cpphs gcc ghc ghc-pkg ghcjs ghcjs-pkg greencard haddock happy
  haskell-suite haskell-suite-pkg hmake hpc hsc2hs hscolour jhc ld lhc lhc-pkg
  pkg-config strip tar uhc

No comments :

Post a Comment