Flags in cabal files

前端 未结 3 2254
既然无缘
既然无缘 2021-02-19 10:27

I am following the user-guide for package developing: https://www.haskell.org/cabal/users-guide/developing-packages.html#quickstart

I got stuck in the Flags

相关标签:
3条回答
  • 2021-02-19 11:04

    Pass the flags to cabal configure, e.g.:

    cabal configure -f debug
    
    0 讨论(0)
  • 2021-02-19 11:13

    With Stack, use

    stack build --flag <pkg>:debug
    

    to set debug flag to True for <pkg>, or use --flag '*:debug' to set debug flag to True for all packages. Replace debug with -debug to set debug flag to False.

    You can also specify flag settings in a stack.yaml file. For example, to set debug flag to False for <pkg>, add this to your stack.yaml:

    flags:
      <pkg>:
        debug: false
    
    0 讨论(0)
  • 2021-02-19 11:29

    With cabal-2.1.0 you can do it like this:

    cabal new-build -f debug 
    
    0 讨论(0)
提交回复
热议问题