src/Tools/Haskell/Test.thy
changeset 69241 5426d266dcc5
parent 69239 6cd985a78d6e
child 69381 4c9b4e2c5460
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/Tools/Haskell/Test.thy	Mon Nov 05 17:37:55 2018 +0100
     1.3 @@ -0,0 +1,23 @@
     1.4 +(*  Title:      Tools/Haskell/Test.thy
     1.5 +    Author:     Makarius
     1.6 +*)
     1.7 +
     1.8 +section \<open>Test build of Isabelle/Haskell modules\<close>
     1.9 +
    1.10 +theory Test imports Haskell
    1.11 +begin
    1.12 +
    1.13 +ML \<open>
    1.14 +  Isabelle_System.with_tmp_dir "ghc" (fn dir =>
    1.15 +    let
    1.16 +      val _ = Haskell.install_sources dir;
    1.17 +      val (out, rc) =
    1.18 +        Isabelle_System.bash_output
    1.19 +         (cat_lines
    1.20 +           ["set -e",
    1.21 +            "cd " ^ File.bash_path dir,
    1.22 +            "\"$ISABELLE_GHC\" " ^ File.bash_paths Haskell.sources]);
    1.23 +    in if rc = 0 then writeln out else error out end)
    1.24 +\<close>
    1.25 +
    1.26 +end