src/HOL/Library/code_test.ML
changeset 69906 55534affe445
parent 69626 0631421c6d6a
child 69925 c90678ad942d
     1.1 --- a/src/HOL/Library/code_test.ML	Sun Mar 10 15:16:45 2019 +0000
     1.2 +++ b/src/HOL/Library/code_test.ML	Sun Mar 10 15:16:45 2019 +0000
     1.3 @@ -442,7 +442,7 @@
     1.4  (* driver for OCaml *)
     1.5  
     1.6  val ocamlN = "OCaml"
     1.7 -val ISABELLE_OCAMLC = "ISABELLE_OCAMLC"
     1.8 +val ISABELLE_OPAM_ROOT = "ISABELLE_OPAM_ROOT"
     1.9  
    1.10  fun mk_driver_ocaml _ path _ value_name =
    1.11    let
    1.12 @@ -467,9 +467,9 @@
    1.13  
    1.14      val compiled_path = Path.append path (Path.basic "test")
    1.15      val compile_cmd =
    1.16 -      "\"$ISABELLE_OCAMLC\" -w pu -o " ^ File.bash_path compiled_path ^
    1.17 -      " -I " ^ File.bash_path path ^
    1.18 -      " nums.cma " ^ File.bash_path code_path ^ " " ^ File.bash_path driver_path
    1.19 +      "\"$ISABELLE_ROOT/lib/scripts/ocamlexec\" ocamlfind ocamlopt -w pu -package zarith -linkpkg " ^
    1.20 +      " -o " ^ File.bash_path compiled_path ^ " -I " ^ File.bash_path path ^ " " ^
    1.21 +      File.bash_path code_path ^ " " ^ File.bash_path driver_path
    1.22  
    1.23      val run_cmd = File.bash_path compiled_path
    1.24    in
    1.25 @@ -478,7 +478,7 @@
    1.26    end
    1.27  
    1.28  fun evaluate_in_ocaml ctxt =
    1.29 -  evaluate mk_driver_ocaml (SOME (ISABELLE_OCAMLC, "ocamlc executable")) ocamlN ctxt
    1.30 +  evaluate mk_driver_ocaml (SOME (ISABELLE_OPAM_ROOT, "ocaml opam environment")) ocamlN ctxt
    1.31  
    1.32  
    1.33  (* driver for GHC *)