# HG changeset patch # User wenzelm # Date 1541447596 -3600 # Node ID c911716d29bb24b32e638b62c51343b0c5f05d9a # Parent 5426d266dcc5938f7ecd9485350b6ac6a7a8a583 more robust: avoid isabelle_stack invocation in settings script (potentially slow or failing); diff -r 5426d266dcc5 -r c911716d29bb lib/Tools/ghc_setup --- a/lib/Tools/ghc_setup Mon Nov 05 17:37:55 2018 +0100 +++ b/lib/Tools/ghc_setup Mon Nov 05 20:53:16 2018 +0100 @@ -4,5 +4,8 @@ # # DESCRIPTION: setup Glasgow Haskell Compiler setup via Stack -isabelle_stack setup --resolver "$ISABELLE_STACK_RESOLVER" "$ISABELLE_GHC_VERSION" && - isabelle_stack ghci --ghci-options --version +set -e + +isabelle_stack setup --resolver "$ISABELLE_STACK_RESOLVER" "$ISABELLE_GHC_VERSION" +isabelle_stack ghci --ghci-options --version +echo -n "$(standard_path "$(isabelle_stack path --programs)")" > "$ISABELLE_STACK_ROOT/ISABELLE_GHC_PROGRAMS" diff -r 5426d266dcc5 -r c911716d29bb lib/scripts/getsettings --- a/lib/scripts/getsettings Mon Nov 05 17:37:55 2018 +0100 +++ b/lib/scripts/getsettings Mon Nov 05 20:53:16 2018 +0100 @@ -110,8 +110,8 @@ fi #enforce ISABELLE_GHC -if [ -d "$ISABELLE_STACK_ROOT" ]; then - if [ -f "$(standard_path "$(isabelle_stack path --programs)")/$ISABELLE_GHC_VERSION/bin/ghc" ]; then +if [ -d "$ISABELLE_STACK_ROOT" -a -f "$ISABELLE_STACK_ROOT/ISABELLE_GHC_PROGRAMS" ]; then + if [ -f "$(cat "$ISABELLE_STACK_ROOT/ISABELLE_GHC_PROGRAMS")/$ISABELLE_GHC_VERSION/bin/ghc" ]; then ISABELLE_GHC="$ISABELLE_HOME/lib/Tools/ghc" fi fi