blob: 61c09d54cc7eef6414a5bc2750ba2c9df6f23a98 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/bash
set -euo pipefail
cd "$(dirname "$0")"
ghcup='ghcup --no-verbose --offline'
# Just take the latest version that ghcup prints, assuming that that's the latest installed one
ver=$($ghcup list -t ghc -c installed -r 2>/dev/null | sed -n '$ s/^ghc \([^ ]*\).*/\1/p')
if [[ -n $ver ]]; then
versionargs=( --ghc "$ver" )
else
# If that fails for whatever reason, just fall back to the currently "set" version
versionargs=()
fi
$ghcup run "${versionargs[@]}" -- ghci Yahb2Defs.hs 2>&1
# vim: set sw=2 ts=8 et:
|