Flags in cabal files

狂风中的少年 提交于 2019-12-04 01:22:33

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

cabal configure -f debug

With cabal-2.1.0 you can do it like this:

cabal new-build -f debug 

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
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!