mirror of
https://github.com/github/semantic.git
synced 2024-11-28 10:15:55 +03:00
16 lines
503 B
Bash
Executable File
16 lines
503 B
Bash
Executable File
#!/bin/bash
|
|
# 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.
|
|
|
|
set -e
|
|
|
|
cd $(dirname "$0")/..
|
|
|
|
repl_builddir=dist-repl
|
|
|
|
if [[ ! -d $repl_builddir ]]; then
|
|
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
|