shaker: simple and interactive command-line build tool

[ bsd3, development, library, program ] [ Propose Tags ]

Shaker is a build tool which allow to simply compile or launch test on an haskell project and provides some interesting features like continuous action. With continuous action, an action (compile or test) will be automatically executed when a source modification is detected.

All configuration are made via cabal; Shaker will read cabal configuration to discover source directories, compilation options and targets to compile.


The cabal configuration file should be generated beforehand with cabal configure. If you change your cabal configuration, you will need to recreate the configuration file.

Launch interactive prompt

In the root of your haskell project, launch shaker. An interactive prompt will allow you to execute different actions.

Launch a shaker action from command-line

In the root of your haskell project, launch shaker with your action as a command argument; shaker will execute the given action and exit. See examples for more details.

Action execution

Simple Execution
An action can be launched normally, by entering the action name.
Multiple action execution
You can specify multiple action to execute simply by separating action by spaces.
Continuous Action
A continuous action will execute the action when a file modification has been detected. Every action are elligible to continuous action, you simply need to prefix them with ~. To stop a continuous action, simply use ^C.

Available actions

Compile the project. Targets of the compilation are main files (in case of executable) and exposed modules (in case of library).
Compile all hs files found in source directory. It is usefull to compile sources not declared in cabal. Since it is not possible to compile multiple modules with main, all modules with a main function are excluded.
Print all available action.
Clean the directory containing .o and .hi files.
Launch all quickcheck properties and hunit tests of the project using test-framework. You can provide one or several regexps as argument and shaker will execute all tests matching one regexp. Quickcheck properties and HUnit tests are automatically discovered using GHC Api. All functions begining with “prop_” are considered as quickcheck properties and all functions of type Test.HUnit.Lang.Assertion and TestCase are considered as HUnit tests.
Same as test but test-module takes one or several module patterns as arguments.
Exit the application. You can also use ^C or ^D to exit shaker.

Examples with interactive prompt

% compile
Simply compile the project
% clean compile
Clean and compile the project
% ~compile
Switch to continuous mode and will compile the project when sources are modified.
% ~clean compile
Switch to continuous mode and will clean and compile the project when sources are modified.
% test
Execute all tests in the project
% test prop_.*
Execute all quickcheck properties of the project.
% test testExecute.* testFilter.*
Execute all tests matching testExecute.* or testFilter.*
% test-module Regex Refle
Launch all tests in modules matching Regex.* or Refle.*

Examples with command-line

% shaker fullcompile
Launch shaker, execute the fullcompile action and give back the control.
% shaker "~fullcompile"
Launch shaker, continuously execute the fullcompile action until shaker is interrupted.

[Skip to Readme]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS] 0.1, 0.2, 0.2.1, 0.3, 0.3.1, 0.4, 0.4.1, 0.4.2, 0.4.3, 0.5.0, 0.5.1
Dependencies base (>=4 && <5), bytestring (>=0.9 && <0.10), Cabal (>=1.10 && <1.11), containers (>=0.4 && <0.5), directory (>=1 && <2), filepath (>=1 && <2), ghc (>=7 && <8), ghc-paths (>=0.1 && <0.2), haskeline (>=0.6 && <0.7), haskell-src (>=1.0 && <1.1), HUnit (>=1.2 && <1.3), mtl (>=2 && <3), old-time (>=1.0.0), parsec3 (>=1 && <2), QuickCheck (>=2.4 && <2.5), regex-posix (>=0.95 && <0.96), template-haskell (>=, test-framework (>=0.4 && <0.5), test-framework-hunit (>=0.2 && <0.3), test-framework-quickcheck2 (>=0.2 && <0.3) [details]
License BSD-3-Clause
Copyright Copyright (c) 2010 Anthonin Bonnefoy
Author Anthonin Bonnefoy
Category Development
Home page
Bug tracker
Source repo head: git clone git://
this: git clone git:// 0.5.1)
Uploaded by AnthoninBonnefoy at 2011-06-19T14:56:08Z
Reverse Dependencies 1 direct, 0 indirect [details]
Executables shaker
Downloads 8720 total (21 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for shaker-0.5.1

[back to package description]
Shaker is a build tool which allow to compile and launch test on haskell project with some features like continuous action similar to SBT.

The package is uploaded in hackage -

To install shaker, either use cabal install - cabal update && cabal install shaker 
Or build shaker from sources - runhaskell Setup.hs configure && runhaskell Setup.hs install