There are several repetitive supporting tasks that I usually have to complete when developing or testing a project. For example: loading some data, setting up a database, clearing logs, etc. In Ruby, they are handled by rake
, while other languages prefer make
or something else (tasks sometimes depend on other tasks, so we may sometimes need one task to perform the subtasks on which it depends).
So, is there any normal way to organize these tasks in a Haskell project?
I would suggest that cabal
could be used for this, but not all of these helper tasks are designed to run Haskell code: sometimes this is just the case of rm -r logs/*.log
executing or loading some data using wget
or curl
. Would it be advisable for the cabal test
target to depend on other Kabbalah targets that, hugh, run shell scripts / commands from Haskell code? (If it is possible to have dependent goals in bondage at all?)
Alternatively, I could use make
, but will the “average haskeller” (for example, a “third-party” project member) find the intuitive? I believe that you first need to try cabal test
before you discover that for this you need to first create a database for testing, and then start a whole chain of other tasks. If you noticed a Makefile
in the first place?
I could not find recipes for handling these helper tasks in a Haskell project.
source share