有什么办法可以为cabal依赖关系定义标志吗? [英] Is there any way to define flags for cabal dependencies?
本文介绍了有什么办法可以为cabal依赖关系定义标志吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我最近遇到了一个cabal hell问题,我只能通过手动安装 在运行
。 c $ c>用于我的项目。 cabal install $>之前,在我的cabal沙盒中使用
-f transformers3
标志执行
有什么办法可以在我的应用程序的 .cabal
文件中指明我依赖于一个库,以便使用特定的构建标志来构建它? 解决方案
现代的方法是使用< a href =http://docs.haskellstack.org/en/stable/README.html =noreferrer> Stack 。编辑您的
stack.yaml
以包含 标记:
变形金刚:
变形金刚3:真
另见 flags 。
I recently ran into a "cabal hell" issue that I only managed to solve by manually installing transformers-compat
with the -f transformers3
flag in my cabal sandbox before running cabal install
for my project.
Is there any way to indicate in my application's .cabal
file that I depend on a library so that it is built with the specific build flag?
解决方案
The modern way to do this is to use Stack. Edit your stack.yaml
to include
flags:
transformers-compat:
transformers3: true
See also the section on flags.
这篇关于有什么办法可以为cabal依赖关系定义标志吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文