Haskell构建生态系统中类似SBT的功能 [英] SBT-like features in the Haskell build ecosystem
本文介绍了Haskell构建生态系统中类似SBT的功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
〜COMMAND
,这意味着对项目中的每个源文件更改执行COMMAND。例如: 〜test
和
〜编译
对于快速开发非常有用。我想知道,有没有人知道类似的Haskell,一个cabal shell,也许?
解决方案你可以得到这样的东西轻松使用 inotifywait
。
只需启动项目目录中的终端并运行如下所示的代码:
$而inotifywait -qq -r -e修改。做cabal build&& ./dist/build/tests/tests;完成
这也适用于任何其他语言;只需插入您选择的构建命令即可。
I've been using Scala with SBT quite a bit lately. The REPL loop of has a handy feature: ~ COMMAND
, meaning perform COMMAND for every source file change in the project. For instance:
~ test
and
~ compile
are terrifically useful for rapid development. I wonder, does anyone know of something similar for Haskell, a cabal shell, maybe?
解决方案
You can get something like this very easily using inotifywait
.
Just fire up a terminal in your project directory and run something like this:
$ while inotifywait -qq -r -e modify .; do cabal build && ./dist/build/tests/tests; done
This also works for any other language; just insert the build commands of your choice.
这篇关于Haskell构建生态系统中类似SBT的功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文