lib/scripts/ghc
author wenzelm
Wed, 31 Mar 2021 11:24:46 +0200
changeset 73772 d3f2038198ae
parent 70131 a7a0115061ec
permissions -rwxr-xr-x
clarified (again): local tip could be actually more recent;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
69151
b310bc57f55f support for GHC via command-line tools;
wenzelm
parents:
diff changeset
     1
#!/usr/bin/env bash
b310bc57f55f support for GHC via command-line tools;
wenzelm
parents:
diff changeset
     2
#
b310bc57f55f support for GHC via command-line tools;
wenzelm
parents:
diff changeset
     3
# Author: Makarius
b310bc57f55f support for GHC via command-line tools;
wenzelm
parents:
diff changeset
     4
#
69273
c1a27fce2076 clarified tool setup for GHC / OCaml: discontinued "isabelle ghc", "isabelle ocaml", "isabelle ocamlc" to avoid confusion with traditional settings variables for executables (these are still required in existing applications, notably in session options [condition = ISABELLE_GHC] etc. and codegen setup;
wenzelm
parents: 69272
diff changeset
     5
# Invoke ghc via "stack".
69151
b310bc57f55f support for GHC via command-line tools;
wenzelm
parents:
diff changeset
     6
70131
a7a0115061ec more robust -- analogous to ocamlfind;
wenzelm
parents: 70111
diff changeset
     7
if [ -f "$ISABELLE_STACK_ROOT/ISABELLE_GHC_EXE-$ISABELLE_PLATFORM_FAMILY" ]
a7a0115061ec more robust -- analogous to ocamlfind;
wenzelm
parents: 70111
diff changeset
     8
then
69272
517655a528fe always insist in specified resolver/compiler version;
wenzelm
parents: 69270
diff changeset
     9
  isabelle_stack ghc -- "$@"
69158
1722cc56d22e more robust: avoid implicit setup (with default resolver);
wenzelm
parents: 69151
diff changeset
    10
else
69160
30c384e72749 clarified errors;
wenzelm
parents: 69158
diff changeset
    11
  echo "Cannot execute ghc: missing Isabelle GHC setup" >&2
69158
1722cc56d22e more robust: avoid implicit setup (with default resolver);
wenzelm
parents: 69151
diff changeset
    12
  exit 127
1722cc56d22e more robust: avoid implicit setup (with default resolver);
wenzelm
parents: 69151
diff changeset
    13
fi