SBT-like features in the Haskell build ecosystem

邮差的信 提交于 2019-12-02 21:25:43

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.

You can script ghci to both define your own commands, and augment existing commands. To do this:

More info on GHCi :def commands is here.

The ghcid project provides something limited to ~ :reload. It provides a few extra features (format to a fixed number of lines, persist warnings from previously loaded files), but not the generality of running any command.

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