# HG changeset patch # User wenzelm # Date 1539805087 -7200 # Node ID b310bc57f55f6cad79ee4ab42c647991bf5b48d7 # Parent 545b688437090a8fd89282ab2cd4f7b0c3392d40 support for GHC via command-line tools; diff -r 545b68843709 -r b310bc57f55f NEWS --- a/NEWS Wed Oct 17 21:37:40 2018 +0200 +++ b/NEWS Wed Oct 17 21:38:07 2018 +0200 @@ -95,6 +95,11 @@ dynamically according the state of ISABELLE_OPAM_ROOT concerning 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 the state of ISABELLE_STACK_ROOT and ISABELLE_STACK_RESOLVER. + New in Isabelle2018 (August 2018) diff -r 545b68843709 -r b310bc57f55f etc/settings --- a/etc/settings Wed Oct 17 21:37:40 2018 +0200 +++ b/etc/settings Wed Oct 17 21:38:07 2018 +0200 @@ -147,6 +147,10 @@ ISABELLE_STACK_ROOT="$ISABELLE_HOME_USER/stack" +ISABELLE_STACK_RESOLVER="lts-12.13" + +ISABELLE_GHC_VERSION="ghc-8.4.3" + ### ### Misc settings @@ -154,7 +158,6 @@ ISABELLE_GNUPLOT="gnuplot" -#ISABELLE_GHC="/usr/bin/ghc" #ISABELLE_MLTON="/usr/bin/mlton" #ISABELLE_SMLNJ="/usr/bin/sml" #ISABELLE_SWIPL="/usr/bin/swipl" diff -r 545b68843709 -r b310bc57f55f lib/Tools/ghc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/Tools/ghc Wed Oct 17 21:38:07 2018 +0200 @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# +# Author: Makarius +# +# DESCRIPTION: invoke Glasgow Haskell Compiler within the Isabelle environment + +isabelle_stack ghc -- "$@" diff -r 545b68843709 -r b310bc57f55f lib/Tools/ghc_setup --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/Tools/ghc_setup Wed Oct 17 21:38:07 2018 +0200 @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# +# Author: Makarius +# +# DESCRIPTION: setup Glasgow Haskell Compiler setup via Stack + +isabelle_stack setup --resolver "$ISABELLE_STACK_RESOLVER" && + isabelle_stack ghci --ghci-options --version diff -r 545b68843709 -r b310bc57f55f lib/Tools/ghc_stack --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/Tools/ghc_stack Wed Oct 17 21:38:07 2018 +0200 @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# +# Author: Makarius +# +# DESCRIPTION: invoke Haskell Tool Stack within the Isabelle environment + +isabelle_stack "$@" diff -r 545b68843709 -r b310bc57f55f lib/Tools/ghci --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/Tools/ghci Wed Oct 17 21:38:07 2018 +0200 @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# +# Author: Makarius +# +# DESCRIPTION: invoke GHC interaction within the Isabelle environment + +isabelle_stack ghci "$@" diff -r 545b68843709 -r b310bc57f55f lib/scripts/getsettings --- a/lib/scripts/getsettings Wed Oct 17 21:37:40 2018 +0200 +++ b/lib/scripts/getsettings Wed Oct 17 21:38:07 2018 +0200 @@ -107,6 +107,11 @@ ISABELLE_OCAMLC="$ISABELLE_HOME/lib/Tools/ocamlc" fi +#GHC +if [ -z "$ISABELLE_GHC" -a -d "$ISABELLE_STACK_ROOT" -a -f "$(isabelle_stack path --programs)/$ISABELLE_GHC_VERSION/ghc" ]; then + ISABELLE_GHC="$ISABELLE_HOME/lib/Tools/ghc" +fi + #enforce JAVA_HOME if [ -d "$ISABELLE_JDK_HOME/jre" ] then