2019-07-01 18:30:13 +03:00
|
|
|
#!/usr/bin/env bash
|
2019-08-13 19:23:03 +03:00
|
|
|
# Copyright (c) 2019 The DAML Authors. All rights reserved.
|
2019-07-01 18:30:13 +03:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
set -euo pipefail
|
2019-09-11 09:57:48 +03:00
|
|
|
cd "$(dirname "$0")"/..
|
2019-07-01 18:30:13 +03:00
|
|
|
export RULES_HASKELL_EXEC_ROOT=$PWD/
|
|
|
|
ENV_FILE=$(mktemp)
|
|
|
|
ARGS_FILE=$(mktemp)
|
2019-09-11 09:57:48 +03:00
|
|
|
bazel build @haskell_ghcide//:ghcide-exe >/dev/null 2>&1
|
2019-07-08 12:40:48 +03:00
|
|
|
bazel run --define hie_bios_ghci=True //compiler/damlc:damlc@ghci -- "$ENV_FILE" "$ARGS_FILE" >/dev/null 2>&1
|
2019-07-01 18:30:13 +03:00
|
|
|
source "$ENV_FILE"
|
|
|
|
export HIE_BIOS_ARGS="$ARGS_FILE"
|
2019-09-11 09:57:48 +03:00
|
|
|
./bazel-bin/external/haskell_ghcide/ghcide-exe $@
|