Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Haskell Build Automation

What is the preferred way to automate build/test/ci/doc-gen/... for a Haskell project?

At the moment I use Cabal for the "final" build and bash-scripts to automate testing/checkins/doc-gen/.. but I would like to replace the bash-scripts.

I've installed Nemesis (rake for Haskell according to the author) but I'm not yet sure it's the right tool.

Just to clarify: I'm looking for something that I can add custom commands with custom arguments to (is it possible with Cabal?), i.e.

foo test unit

foo test db

foo test all

foo db migrate

...

like image 369
finnsson Avatar asked Jul 08 '09 08:07

finnsson


2 Answers

Cabal is the preferred way to build/test/generate docs for Haskell projects. ~1500 projects are built this way on hackage:

To build docs for your project:

  • cabal haddock

To build your project:

  • cabal install

To clean your project:

  • cabal clean
like image 158
Don Stewart Avatar answered Oct 03 '22 07:10

Don Stewart


I might be old fashioned, but I just set up my .cabal file and darcs repository and add a Makefile that with the dependencies of its default action tries to build my package, runs any tests, checks in the current build, and fires off cabal haddock to generate my documentation.

Then I just crack open vim and keep call out to make as needed.

like image 21
Edward Kmett Avatar answered Oct 03 '22 06:10

Edward Kmett