summaryrefslogtreecommitdiff
path: root/Biz/Ide/repl
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Ide/repl')
-rwxr-xr-xBiz/Ide/repl18
1 files changed, 15 insertions, 3 deletions
diff --git a/Biz/Ide/repl b/Biz/Ide/repl
index 3b24144..3fc8a08 100755
--- a/Biz/Ide/repl
+++ b/Biz/Ide/repl
@@ -14,7 +14,19 @@
target=${1:?}
json=$(bild --json "$target")
langdeps=$(jq --raw-output '.[].langdeps | join(" ")' <<< $json)
- nix-shell \
- --packages "(import $BIZ_ROOT/Biz/Bild.nix {}).ghcWith (h: with h; [$langdeps])" \
- --command "ghci -i$BIZ_ROOT -ghci-script $BIZ_ROOT/.ghci $target"
+ case $target in
+ *.hs)
+ nix-shell \
+ --packages "(import $BIZ_ROOT/Biz/Bild.nix {}).ghcWith (h: with h; [$langdeps])" \
+ --command "ghci -i$BIZ_ROOT -ghci-script $BIZ_ROOT/.ghci $target"
+ ;;
+ *.scm)
+ echo "scheme repl not supported yet: $target"
+ exit 1
+ ;;
+ *)
+ echo "unsupported target: $target"
+ exit 1
+ ;;
+ esac
##