src/Pure/ML/ml_compiler2.ML
author wenzelm
Sun, 05 Feb 2023 20:09:39 +0100
changeset 77199 7d7786585ab0
parent 74148 a97d5356f1d9
permissions -rw-r--r--
more diagnostic operations (see also 5c7652e9bc01);

(*  Title:      Pure/ML/ml_compiler2.ML
    Author:     Makarius

Isabelle/ML file operations.
*)

val {ML_file, ML_file_debug, ML_file_no_debug} =
  ML_Compiler0.ML_file_operations (fn opt_debug => fn file =>
    let val flags = ML_Compiler.verbose true (ML_Compiler.debug_flags opt_debug) in
      Position.setmp_thread_data (Position.file_only file) (fn () =>
        ML_Context.eval_file flags (Path.explode file)
          handle ERROR msg => (writeln msg; error "ML error")) ()
    end);

val use = ML_file;