src/Tools/Haskell/Test.thy
author wenzelm
Mon Nov 05 17:37:55 2018 +0100 (7 months ago)
changeset 69241 5426d266dcc5
parent 69239 src/Tools/Haskell/Build.thy@6cd985a78d6e
child 69381 4c9b4e2c5460
permissions -rw-r--r--
clarified names;
wenzelm@69241
     1
(*  Title:      Tools/Haskell/Test.thy
wenzelm@69225
     2
    Author:     Makarius
wenzelm@69225
     3
*)
wenzelm@69225
     4
wenzelm@69241
     5
section \<open>Test build of Isabelle/Haskell modules\<close>
wenzelm@69225
     6
wenzelm@69241
     7
theory Test imports Haskell
wenzelm@69225
     8
begin
wenzelm@69225
     9
wenzelm@69239
    10
ML \<open>
wenzelm@69225
    11
  Isabelle_System.with_tmp_dir "ghc" (fn dir =>
wenzelm@69225
    12
    let
wenzelm@69239
    13
      val _ = Haskell.install_sources dir;
wenzelm@69225
    14
      val (out, rc) =
wenzelm@69225
    15
        Isabelle_System.bash_output
wenzelm@69225
    16
         (cat_lines
wenzelm@69225
    17
           ["set -e",
wenzelm@69225
    18
            "cd " ^ File.bash_path dir,
wenzelm@69239
    19
            "\"$ISABELLE_GHC\" " ^ File.bash_paths Haskell.sources]);
wenzelm@69239
    20
    in if rc = 0 then writeln out else error out end)
wenzelm@69225
    21
\<close>
wenzelm@69225
    22
wenzelm@69225
    23
end