Hi

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 ;-)

Greetings

Alex

[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

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to