Skip to content

Instantly share code, notes, and snippets.

@songpp
Created February 17, 2015 07:10
Show Gist options
  • Save songpp/583a26a9c571081c973d to your computer and use it in GitHub Desktop.
Save songpp/583a26a9c571081c973d to your computer and use it in GitHub Desktop.
haskell hsdev utilities
#! /bin/bash
THIS_PROJECT=$(cd "$(dirname "$0")"; pwd);
THIS_PROJECT_DIR_NAME=$(basename "$THIS_PROJECT");
MY_SANDBOX=~/tools/dev-sandbox/;
set -x;
exec 3>&1
rescan() {
hsdev start --port 4567 --cache "$THIS_PROJECT/.hsdev" >&3;
sleep 2;
cd $THIS_PROJECT;
hsdev rescan --cabal --project "../$THIS_PROJECT_DIR_NAME" --sandbox $MY_SANDBOX >&3;
}
$( rescan )
exec 3>&-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment