Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Arranging auxiliary tasks for a Haskell project

Tags:

haskell

There are some repetitive auxiliary tasks that I usually have to run when developing or testing a project. For example: downloading some data, setting up the database, cleaning the logs, etc. In Ruby land, they are handled by rake while other languages prefer make or something else (tasks occasionally depend on other tasks, so we may occasionally need one task to perform subtasks that it depends on).

So, is there some conventional way to organize those tasks in a Haskell project?

I would assume that cabal could be used for that, but not all of those auxiliary tasks are about running Haskell code: sometimes it's just a case of performing rm -r logs/*.log or downloading some data with wget or curl. Would it make sense to make cabal's test target depend on other cabal targets that, ugh, run shell scripts/commands from Haskell code? (If it's possible to have dependent targets in cabal at all?)

Alternatively, I could use make, but would "an average haskeller" (an "outside" project contributor, for example) find that intuitive? I believe one would first try cabal test before discovering that it requires setting up the database for the testing first, then running a whole chain of other tasks. Would one notice a Makefile in the first place?

I couldn't find any recipes for handling those auxiliary tasks in Haskell project around.

like image 494
Slava Kravchenko Avatar asked Nov 27 '14 10:11

Slava Kravchenko


1 Answers

As long as I know, there's no de facto standard tool in Haskell project.

But recently I heard Shake, a monadic build system written in Haskell.

like image 76
YAMAMOTO Yuji Avatar answered Oct 26 '22 23:10

YAMAMOTO Yuji