support for GHC via command-line tools;
authorwenzelm
Wed Oct 17 21:38:07 2018 +0200 (13 months ago ago)
changeset 69151b310bc57f55f
parent 69150 545b68843709
child 69152 77eede3f40e2
support for GHC via command-line tools;
NEWS
etc/settings
lib/Tools/ghc
lib/Tools/ghc_setup
lib/Tools/ghc_stack
lib/Tools/ghci
lib/scripts/getsettings
     1.1 --- a/NEWS	Wed Oct 17 21:37:40 2018 +0200
     1.2 +++ b/NEWS	Wed Oct 17 21:38:07 2018 +0200
     1.3 @@ -95,6 +95,11 @@
     1.4  dynamically according the state of ISABELLE_OPAM_ROOT concerning
     1.5  ISABELLE_OCAML_VERSION.
     1.6  
     1.7 +* Support for Glasgow Haskell Compiler via command-line tools "isabelle
     1.8 +ghc_setup", "isabelle ghci", "isabelle ghc", "isabelle ghc_stack".
     1.9 +Existing settings variable ISABELLE_GHC is maintained dynamically
    1.10 +according the state of ISABELLE_STACK_ROOT and ISABELLE_STACK_RESOLVER.
    1.11 +
    1.12  
    1.13  
    1.14  New in Isabelle2018 (August 2018)
     2.1 --- a/etc/settings	Wed Oct 17 21:37:40 2018 +0200
     2.2 +++ b/etc/settings	Wed Oct 17 21:38:07 2018 +0200
     2.3 @@ -147,6 +147,10 @@
     2.4  
     2.5  ISABELLE_STACK_ROOT="$ISABELLE_HOME_USER/stack"
     2.6  
     2.7 +ISABELLE_STACK_RESOLVER="lts-12.13"
     2.8 +
     2.9 +ISABELLE_GHC_VERSION="ghc-8.4.3"
    2.10 +
    2.11  
    2.12  ###
    2.13  ### Misc settings
    2.14 @@ -154,7 +158,6 @@
    2.15  
    2.16  ISABELLE_GNUPLOT="gnuplot"
    2.17  
    2.18 -#ISABELLE_GHC="/usr/bin/ghc"
    2.19  #ISABELLE_MLTON="/usr/bin/mlton"
    2.20  #ISABELLE_SMLNJ="/usr/bin/sml"
    2.21  #ISABELLE_SWIPL="/usr/bin/swipl"
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/lib/Tools/ghc	Wed Oct 17 21:38:07 2018 +0200
     3.3 @@ -0,0 +1,7 @@
     3.4 +#!/usr/bin/env bash
     3.5 +#
     3.6 +# Author: Makarius
     3.7 +#
     3.8 +# DESCRIPTION: invoke Glasgow Haskell Compiler within the Isabelle environment
     3.9 +
    3.10 +isabelle_stack ghc -- "$@"
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/lib/Tools/ghc_setup	Wed Oct 17 21:38:07 2018 +0200
     4.3 @@ -0,0 +1,8 @@
     4.4 +#!/usr/bin/env bash
     4.5 +#
     4.6 +# Author: Makarius
     4.7 +#
     4.8 +# DESCRIPTION: setup Glasgow Haskell Compiler setup via Stack
     4.9 +
    4.10 +isabelle_stack setup --resolver "$ISABELLE_STACK_RESOLVER" &&
    4.11 +  isabelle_stack ghci --ghci-options --version
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/lib/Tools/ghc_stack	Wed Oct 17 21:38:07 2018 +0200
     5.3 @@ -0,0 +1,7 @@
     5.4 +#!/usr/bin/env bash
     5.5 +#
     5.6 +# Author: Makarius
     5.7 +#
     5.8 +# DESCRIPTION: invoke Haskell Tool Stack within the Isabelle environment
     5.9 +
    5.10 +isabelle_stack "$@"
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/lib/Tools/ghci	Wed Oct 17 21:38:07 2018 +0200
     6.3 @@ -0,0 +1,7 @@
     6.4 +#!/usr/bin/env bash
     6.5 +#
     6.6 +# Author: Makarius
     6.7 +#
     6.8 +# DESCRIPTION: invoke GHC interaction within the Isabelle environment
     6.9 +
    6.10 +isabelle_stack ghci "$@"
     7.1 --- a/lib/scripts/getsettings	Wed Oct 17 21:37:40 2018 +0200
     7.2 +++ b/lib/scripts/getsettings	Wed Oct 17 21:38:07 2018 +0200
     7.3 @@ -107,6 +107,11 @@
     7.4    ISABELLE_OCAMLC="$ISABELLE_HOME/lib/Tools/ocamlc"
     7.5  fi
     7.6  
     7.7 +#GHC
     7.8 +if [ -z "$ISABELLE_GHC" -a -d "$ISABELLE_STACK_ROOT" -a -f "$(isabelle_stack path --programs)/$ISABELLE_GHC_VERSION/ghc" ]; then
     7.9 +  ISABELLE_GHC="$ISABELLE_HOME/lib/Tools/ghc"
    7.10 +fi
    7.11 +
    7.12  #enforce JAVA_HOME
    7.13  if [ -d "$ISABELLE_JDK_HOME/jre" ]
    7.14  then