[Haskell-cafe] Organizing big repository

Alexander Bernauer alex-haskell at copton.net
Tue Nov 1 09:02:50 CET 2011


On Thu, Oct 27, 2011 at 08:02:58PM +0300, Konstantin Litvinenko wrote:
> Having program 'foo' depends on lib 'bar' I want to edit some files
> in 'bar' than build 'foo' and get 'bar' rebuilt and 'foo'
> rebuilt/relink.
> How can I do this?

I use cabal-dev [1] along with the react tool [2]. The former does the
dependencies-configure-build-install and the latter is a command-line
wrapper around inotify.

With this combo you can rebuild your project whenever any Haskell source
file changes:

react -p "*.hs" src/ "cabal-dev install"

For my workflow, I have an additional wrapper script for cabal-dev that
generates a quickfix file for Vim [3]. Then the workflow goes like:
safe file -> wait for build to complete (OSD/libnotify) -> press F5 to
jump to the location of the first compiler error or warning.

Together with NERDTree [4] this is almost like an IDE ;-)



[1] https://github.com/creswick/cabal-dev
[2] https://github.com/copton/react
[3] http://vimdoc.sourceforge.net/htmldoc/quickfix.html
[4] http://www.vim.org/scripts/script.php?script_id=1658
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111101/4a1e792f/attachment.pgp>

More information about the Haskell-Cafe mailing list