summaryrefslogtreecommitdiff
path: root/repl
diff options
context:
space:
mode:
Diffstat (limited to 'repl')
-rwxr-xr-xrepl11
1 files changed, 11 insertions, 0 deletions
diff --git a/repl b/repl
new file mode 100755
index 0000000..40528c7
--- /dev/null
+++ b/repl
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+set -ex
+prefix=$(echo $PWD | sed -e "s|^$BIZ_ROOT/*||" -e "s|/|.|g")
+if [[ "$prefix" == "" ]]
+then
+ target="$1"
+else
+ target="$prefix.$1"
+fi
+nix run -f $BIZ_ROOT/default.nix "$target.env" \
+ -c ghci -i$BIZ_ROOT -ghci-script "$BIZ_ROOT/.ghci"