daml/compiler/ghcide-daml.sh
Moritz Kiefer f7befca723
Get ghcide from the new upstream repo (#2867)
* Get ghcide from the new upstream repo

* Update azure-pipelines.yml

Co-Authored-By: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2019-09-11 08:57:48 +02:00

15 lines
507 B
Bash
Executable File

#!/usr/bin/env bash
# Copyright (c) 2019 The DAML Authors. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
set -euo pipefail
cd "$(dirname "$0")"/..
export RULES_HASKELL_EXEC_ROOT=$PWD/
ENV_FILE=$(mktemp)
ARGS_FILE=$(mktemp)
bazel build @haskell_ghcide//:ghcide-exe >/dev/null 2>&1
bazel run --define hie_bios_ghci=True //compiler/damlc:damlc@ghci -- "$ENV_FILE" "$ARGS_FILE" >/dev/null 2>&1
source "$ENV_FILE"
export HIE_BIOS_ARGS="$ARGS_FILE"
./bazel-bin/external/haskell_ghcide/ghcide-exe $@