#!/usr/bin/env zsh relaunchCompilation() { while read line; do if (( $( print -- $line | grep '.cabal-sandbox' | wc -l) == 0 )); then print "$line" cabal install ./.cabal-sandbox/bin/test-holy-project fi done } # launch a cabal install and cabal test after each # small haskell file modification {hobbes "*.hs" | relaunchCompilation } & hobbes "*.cabal" | relaunchCompilation