![](/img/trans.png)
[英]How to run a haskell executable (cabal project) without having cabal or ghc installed
[英]Defining an Executable in Cabal that is Not Installed
有executable
的cabal属性是否表示“请勿安装此可执行文件”。
例如在myproject.cabal
我将有:
executable install_exe
...
executable support_exe -- not to be installed via cabal install
install: False
编辑:我知道我可以或许可以说在命令行的东西只得到一个,但我期待的东西,可以在小集团文件是默认的。
谢谢!
您可以在executable
节中使用buildable: False
来指示cabal不要构建support_exe
。 如果您想要在某些情况下启用它的方法,则可以使用build标志来保护此子句。 下面是一个不完整的示例。
flag support
description: Build and install supporting executables
default: False
executable support_exe
if !flag(support)
buildable: False
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.