lib/scripts/ghc
author wenzelm
Thu, 08 Nov 2018 16:18:12 +0100
changeset 69268 c1a27fce2076
parent 69267 lib/Tools/ghc@517655a528fe
child 69929 b979e3044d8e
permissions -rwxr-xr-x
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;
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
#
69268
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: 69267
diff changeset
     5
# Invoke ghc via "stack".
69151
b310bc57f55f support for GHC via command-line tools;
wenzelm
parents:
diff changeset
     6
69268
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: 69267
diff changeset
     7
if [ -d "$ISABELLE_STACK_ROOT" ]; then
69267
517655a528fe always insist in specified resolver/compiler version;
wenzelm
parents: 69265
diff changeset
     8
  isabelle_stack ghc -- "$@"
69158
1722cc56d22e more robust: avoid implicit setup (with default resolver);
wenzelm
parents: 69151
diff changeset
     9
else
69160
30c384e72749 clarified errors;
wenzelm
parents: 69158
diff changeset
    10
  echo "Cannot execute ghc: missing Isabelle GHC setup" >&2
69158
1722cc56d22e more robust: avoid implicit setup (with default resolver);
wenzelm
parents: 69151
diff changeset
    11
  exit 127
1722cc56d22e more robust: avoid implicit setup (with default resolver);
wenzelm
parents: 69151
diff changeset
    12
fi