1
1
mirror of https://github.com/github/semantic.git synced 2025-01-01 11:46:14 +03:00
semantic/script/repl

14 lines
598 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
2019-12-18 17:00:13 +03:00
cd "$(dirname "$0")/.."
2019-10-30 22:18:43 +03:00
# do a build of dependencies up front to ensure theyre all available
2019-12-20 18:44:28 +03:00
cabal v2-build all --enable-benchmarks --enable-tests --only-dependencies
2019-12-18 17:17:08 +03:00
# exec ghci with the appropriate flags, and without the $GHC_ENVIRONMENT variable interfering
2019-12-18 17:00:23 +03:00
cabal v2-exec env -- -u GHC_ENVIRONMENT ghci -ghci-script=.ghci.repl $(script/ghci-flags) -no-ignore-dot-ghci $@