src/Pure/ML-Systems/ml_system.ML
author blanchet
Mon, 03 Feb 2014 11:30:53 +0100
changeset 55278 73372494fd80
parent 48416 5787e1c911d0
child 60962 faa452d8e265
permissions -rw-r--r--
more flexible compression, choosing whichever proof method works

(*  Title:      Pure/ML-Systems/ml_system.ML
    Author:     Makarius

ML system and platform operations.
*)

signature ML_SYSTEM =
sig
  val name: string
  val is_polyml: bool
  val is_smlnj: bool
  val platform: string
  val platform_is_cygwin: bool
  val share_common_data: unit -> unit
  val save_state: string -> unit
end;

structure ML_System: ML_SYSTEM =
struct

val SOME name = OS.Process.getEnv "ML_SYSTEM";
val is_polyml = String.isPrefix "polyml" name;
val is_smlnj = String.isPrefix "smlnj" name;

val SOME platform = OS.Process.getEnv "ML_PLATFORM";
val platform_is_cygwin = String.isSuffix "cygwin" platform;

fun share_common_data () = ();
fun save_state _ = raise Fail "Cannot save state -- undefined operation";

end;