mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-11 04:45:57 +03:00
* Update rules_haskell The workaround for linking against `Cffi` in the REPL has been upstreamed in a more generalized form. CHANGELOG_BEGIN CHANGELOG_END * ghcide: Use rules_haskell's hie-bios support * Document `ghcide` Bazel integration * Rename files to match module names Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
30 lines
707 B
Bash
Executable File
30 lines
707 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
hie_bios_flags() {
|
|
bazel build //compiler/damlc:damlc@ghci \
|
|
--output_groups=hie_bios \
|
|
--experimental_show_artifacts \
|
|
2>&1 \
|
|
| awk '
|
|
BEGIN { rts_opts = false }
|
|
/^>>>/ {
|
|
while ((getline line < substr($1, 4)) > 0) {
|
|
if (rts_opts) {
|
|
if (line == "-RTS") {
|
|
rts_opts = false
|
|
}
|
|
} else if (line == "+RTS") {
|
|
rts_opts = true
|
|
} else if (match(line, "-qg|-fexternal-interpreter")) {
|
|
} else {
|
|
print line
|
|
}
|
|
}
|
|
}'
|
|
}
|
|
if [[ -z "${HIE_BIOS_OUTPUT-}" ]]; then
|
|
hie_bios_flags
|
|
else
|
|
hie_bios_flags >"$HIE_BIOS_OUTPUT"
|
|
fi
|