1
1
mirror of https://github.com/github/semantic.git synced 2024-12-18 20:31:55 +03:00
semantic/script/repl
2019-12-20 10:44:28 -05:00

14 lines
598 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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")/.."
# do a build of dependencies up front to ensure theyre all available
cabal v2-build all --enable-benchmarks --enable-tests --only-dependencies
# exec ghci with the appropriate flags, and without the $GHC_ENVIRONMENT variable interfering
cabal v2-exec env -- -u GHC_ENVIRONMENT ghci -ghci-script=.ghci.repl $(script/ghci-flags) -no-ignore-dot-ghci $@