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;
authorwenzelm
Thu, 08 Nov 2018 16:18:12 +0100
changeset 69268 c1a27fce2076
parent 69267 517655a528fe
child 69269 1bee990d443c
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;
NEWS
lib/Tools/ghc
lib/Tools/ghci
lib/Tools/ocaml
lib/Tools/ocamlc
lib/scripts/getsettings
lib/scripts/ghc
lib/scripts/ocaml
lib/scripts/ocamlc
--- a/NEWS	Thu Nov 08 15:52:10 2018 +0100
+++ b/NEWS	Thu Nov 08 16:18:12 2018 +0100
@@ -124,17 +124,36 @@
 presence of structurally broken sources: full consolidation of theories
 is no longer required.
 
-* Support for OCaml via command-line tools "isabelle ocaml_setup",
-"isabelle ocaml", "isabelle ocamlc", "isabelle ocaml_opam". Existing
-settings variables ISABELLE_OCAML and ISABELLE_OCAMLC are maintained
-dynamically according the state of ISABELLE_OPAM_ROOT and
-ISABELLE_OCAML_VERSION.
-
-* Support for Glasgow Haskell Compiler via command-line tools "isabelle
-ghc_setup", "isabelle ghci", "isabelle ghc", "isabelle ghc_stack".
-Existing settings variable ISABELLE_GHC is maintained dynamically
-according to the state of ISABELLE_STACK_ROOT and
-ISABELLE_STACK_RESOLVER.
+* Support for managed installations of Glasgow Haskell Compiler and
+OCaml via the following command-line tools:
+
+  isabelle ghc_setup
+  isabelle ghc_stack
+
+  isabelle ocaml_setup
+  isabelle ocaml_opam
+
+The global installation state is determined by the following settings
+(and corresponding directory contents):
+
+  ISABELLE_STACK_ROOT
+  ISABELLE_STACK_RESOLVER
+  ISABELLE_GHC_VERSION
+
+  ISABELLE_OPAM_ROOT
+  ISABELLE_OCAML_VERSION
+
+After setup, the following Isabelle settings are automatically
+redirected (overriding existing user settings):
+
+ ISABELLE_GHC
+
+ ISABELLE_OCAML
+ ISABELLE_OCAMLC
+
+The old meaning of these settings as locally installed executables may
+be recovered by purging the directories ISABELLE_STACK_ROOT /
+ISABELLE_OPAM_ROOT.
 
 * Update to Java 11: the latest long-term support version of OpenJDK.
 
--- a/lib/Tools/ghc	Thu Nov 08 15:52:10 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-#!/usr/bin/env bash
-#
-# Author: Makarius
-#
-# DESCRIPTION: invoke Glasgow Haskell Compiler within the Isabelle environment
-
-if [ -d "$ISABELLE_STACK_ROOT" -a -n "$ISABELLE_GHC" ]; then
-  isabelle_stack ghc -- "$@"
-else
-  echo "Cannot execute ghc: missing Isabelle GHC setup" >&2
-  exit 127
-fi
--- a/lib/Tools/ghci	Thu Nov 08 15:52:10 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-#!/usr/bin/env bash
-#
-# Author: Makarius
-#
-# DESCRIPTION: invoke GHC interaction within the Isabelle environment
-
-isabelle ghc --interactive "$@"
--- a/lib/Tools/ocaml	Thu Nov 08 15:52:10 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-#
-# Author: Makarius
-#
-# DESCRIPTION: invoke OCaml within the Isabelle environment
-
-if [ -d "$ISABELLE_OPAM_ROOT" -a -n "$ISABELLE_OCAML" ]
-then
-  isabelle_opam config exec --switch "$ISABELLE_OCAML_VERSION" -- ocaml "$@"
-else
-  echo "Cannot execute ocaml: missing Isabelle OCaml setup" >&2
-  exit 127
-fi
--- a/lib/Tools/ocamlc	Thu Nov 08 15:52:10 2018 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-#
-# Author: Makarius
-#
-# DESCRIPTION: invoke OCaml compiler within the Isabelle environment
-
-if [ -d "$ISABELLE_OPAM_ROOT" -a -n "$ISABELLE_OCAMLC" ]
-then
-  isabelle_opam config exec --switch "$ISABELLE_OCAML_VERSION" -- ocamlc "$@"
-else
-  echo "Cannot execute ocamlc: missing Isabelle OCaml setup" >&2
-  exit 127
-fi
--- a/lib/scripts/getsettings	Thu Nov 08 15:52:10 2018 +0100
+++ b/lib/scripts/getsettings	Thu Nov 08 16:18:12 2018 +0100
@@ -101,18 +101,18 @@
 
 #enforce ISABELLE_OCAML
 if [ -f "$ISABELLE_OPAM_ROOT/$ISABELLE_OCAML_VERSION/bin/ocaml" ]; then
-  ISABELLE_OCAML="$ISABELLE_HOME/lib/Tools/ocaml"
+  ISABELLE_OCAML="$ISABELLE_HOME/lib/scripts/ocaml"
 fi
 
 #enforce ISABELLE_OCAMLC
 if [ -f "$ISABELLE_OPAM_ROOT/$ISABELLE_OCAML_VERSION/bin/ocamlc" ]; then
-  ISABELLE_OCAMLC="$ISABELLE_HOME/lib/Tools/ocamlc"
+  ISABELLE_OCAMLC="$ISABELLE_HOME/lib/scripts/ocamlc"
 fi
 
 #enforce ISABELLE_GHC
 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"
+    ISABELLE_GHC="$ISABELLE_HOME/lib/scripts/ghc"
   fi
 fi
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/scripts/ghc	Thu Nov 08 16:18:12 2018 +0100
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+#
+# Author: Makarius
+#
+# Invoke ghc via "stack".
+
+if [ -d "$ISABELLE_STACK_ROOT" ]; then
+  isabelle_stack ghc -- "$@"
+else
+  echo "Cannot execute ghc: missing Isabelle GHC setup" >&2
+  exit 127
+fi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/scripts/ocaml	Thu Nov 08 16:18:12 2018 +0100
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+#
+# Author: Makarius
+#
+# Invoke ocaml via "opam".
+
+if [ -d "$ISABELLE_OPAM_ROOT" ]
+then
+  isabelle_opam config exec --switch "$ISABELLE_OCAML_VERSION" -- ocaml "$@"
+else
+  echo "Cannot execute ocaml: missing Isabelle OCaml setup" >&2
+  exit 127
+fi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/scripts/ocamlc	Thu Nov 08 16:18:12 2018 +0100
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+#
+# Author: Makarius
+#
+# Invoke ocamlc via "opam".
+
+if [ -d "$ISABELLE_OPAM_ROOT" ]
+then
+  isabelle_opam config exec --switch "$ISABELLE_OCAML_VERSION" -- ocamlc "$@"
+else
+  echo "Cannot execute ocamlc: missing Isabelle OCaml setup" >&2
+  exit 127
+fi