1
1
mirror of https://github.com/github/semantic.git synced 2024-12-18 12:21:57 +03:00
semantic/script/repl

16 lines
503 B
Plaintext
Raw Normal View History

2019-10-30 22:18:43 +03:00
#!/bin/bash
2019-10-30 23:08:42 +03:00
# Usage: script/repl [ARGS...]
# Run a repl session capable of loading all of the packages and their individual components. Any passed arguments, e.g. module names or flags, will be passed to ghci.
2019-10-30 22:18:43 +03:00
set -e
cd $(dirname "$0")/..
repl_builddir=dist-repl
if [[ ! -d $repl_builddir ]]; then
2019-11-01 16:10:49 +03:00
echo "$repl_builddir does not exist, first run 'cabal repl --builddir=$repl_builddir', exit, and then re-run $0"
else
cabal exec --builddir=$repl_builddir ghci -- -ghci-script=.ghci.semantic $@
fi