Fix running the IDE on damlc (#1956)
* Fix running the IDE on damlc
There were two issues:
1. Missing include paths.
2. Files where the module name does not match the file name.
I’ve fixed both and added a test that we can load the damlc Main.hs.
commit27f547fd9434293135133f2abad975bac0e89672
authorMoritz Kiefer <moritz.kiefer@purelyfunctional.org>
dateMon 1 Jul 2019, 17:30 (7 years ago)
parentc1efd35
hie-core-daml.shnew file+15
@@ -0,0 +1,15 @@
1+#!/usr/bin/env bash
2+# Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
3+# SPDX-License-Identifier: Apache-2.0
4+
5+set -euo pipefail
6+cd "$(dirname "$0")"/../..
7+export RULES_HASKELL_EXEC_ROOT=$PWD/
8+ENV_FILE=$(mktemp)
9+ARGS_FILE=$(mktemp)
10+bazel build //compiler/hie-core:hie-core-exe >/dev/null 2>&1
11+bazel run --define hie_bios_ghci=True //daml-foundations/daml-tools/damlc-app:damlc-app@ghci -- "$ENV_FILE" "$ARGS_FILE" >/dev/null 2>&1
12+source "$ENV_FILE"
13+export HIE_BIOS_ARGS="$ARGS_FILE"
14+./bazel-bin/compiler/hie-core/hie-core-exe $@
15+