#!/usr/bin/env bash # # a simple complement to bild which only deals with launching repls # # > repl # # Starts a repl/shell for target. # # - if target.hs, load ghci # - TODO: if target.scm, load scheme repl # - TODO: if target.nix, load nix-shell ## set -e target=${1:?} json=$(bild --json $1) 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" ##