Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 37dbaf3

Browse files
committed
Add the repl script.
1 parent 19f2f17 commit 37dbaf3

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

  • semantic-analysis/script

semantic-analysis/script/repl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
# Usage: script/repl [ARGS...]
3+
# Run a repl session capable of loading all of the components. Any passed arguments, e.g. module names or flags, will be passed to ghci.
4+
5+
set -e
6+
7+
cd "$(dirname "$0")/.."
8+
9+
# cabal v2-build all --only-dependencies
10+
11+
cores=$(sysctl -n machdep.cpu.core_count || echo 4)
12+
cabal v2-exec env -- -u GHC_ENVIRONMENT ghci +RTS -N$((cores + 1)) -RTS -ghci-script=.ghci.repl $(script/ghci-flags) -no-ignore-dot-ghci $@

0 commit comments

Comments
 (0)