src/Pure/ML/ml_options.ML
author wenzelm
Fri, 23 Jun 2017 14:38:32 +0200
changeset 66176 b51a40281016
parent 64556 851ae0e7b09c
child 69575 f77cc54f6d47
permissions -rw-r--r--
tuned signature;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
56303
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
     1
(*  Title:      Pure/ML/ml_options.ML
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
     2
    Author:     Makarius
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
     3
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
     4
ML configuration options.
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
     5
*)
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
     6
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
     7
signature ML_OPTIONS =
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
     8
sig
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
     9
  val source_trace_raw: Config.raw
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    10
  val source_trace: bool Config.T
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    11
  val exception_trace_raw: Config.raw
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    12
  val exception_trace: bool Config.T
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    13
  val exception_trace_enabled: Context.generic option -> bool
62498
5dfcc9697f29 support for ML_exception_debugger;
wenzelm
parents: 60730
diff changeset
    14
  val exception_debugger_raw: Config.raw
5dfcc9697f29 support for ML_exception_debugger;
wenzelm
parents: 60730
diff changeset
    15
  val exception_debugger: bool Config.T
5dfcc9697f29 support for ML_exception_debugger;
wenzelm
parents: 60730
diff changeset
    16
  val exception_debugger_enabled: Context.generic option -> bool
60730
02c2860fcf30 added option ML_debugger;
wenzelm
parents: 57834
diff changeset
    17
  val debugger_raw: Config.raw
02c2860fcf30 added option ML_debugger;
wenzelm
parents: 57834
diff changeset
    18
  val debugger: bool Config.T
02c2860fcf30 added option ML_debugger;
wenzelm
parents: 57834
diff changeset
    19
  val debugger_enabled: Context.generic option -> bool
56303
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    20
end;
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    21
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    22
structure ML_Options: ML_OPTIONS =
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    23
struct
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    24
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    25
(* source trace *)
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    26
56438
7f6b2634d853 more source positions;
wenzelm
parents: 56303
diff changeset
    27
val source_trace_raw =
64556
851ae0e7b09c more symbols;
wenzelm
parents: 62878
diff changeset
    28
  Config.declare ("ML_source_trace", \<^here>) (fn _ => Config.Bool false);
56303
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    29
val source_trace = Config.bool source_trace_raw;
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    30
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    31
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    32
(* exception trace *)
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    33
64556
851ae0e7b09c more symbols;
wenzelm
parents: 62878
diff changeset
    34
val exception_trace_raw = Config.declare_option ("ML_exception_trace", \<^here>);
56303
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    35
val exception_trace = Config.bool exception_trace_raw;
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    36
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    37
fun exception_trace_enabled NONE =
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    38
      (Options.default_bool (Config.name_of exception_trace_raw) handle ERROR _ => false)
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    39
  | exception_trace_enabled (SOME context) = Config.get_generic context exception_trace;
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    40
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    41
62498
5dfcc9697f29 support for ML_exception_debugger;
wenzelm
parents: 60730
diff changeset
    42
(* exception debugger *)
5dfcc9697f29 support for ML_exception_debugger;
wenzelm
parents: 60730
diff changeset
    43
64556
851ae0e7b09c more symbols;
wenzelm
parents: 62878
diff changeset
    44
val exception_debugger_raw = Config.declare_option ("ML_exception_debugger", \<^here>);
62498
5dfcc9697f29 support for ML_exception_debugger;
wenzelm
parents: 60730
diff changeset
    45
val exception_debugger = Config.bool exception_debugger_raw;
5dfcc9697f29 support for ML_exception_debugger;
wenzelm
parents: 60730
diff changeset
    46
5dfcc9697f29 support for ML_exception_debugger;
wenzelm
parents: 60730
diff changeset
    47
fun exception_debugger_enabled NONE =
5dfcc9697f29 support for ML_exception_debugger;
wenzelm
parents: 60730
diff changeset
    48
      (Options.default_bool (Config.name_of exception_debugger_raw) handle ERROR _ => false)
5dfcc9697f29 support for ML_exception_debugger;
wenzelm
parents: 60730
diff changeset
    49
  | exception_debugger_enabled (SOME context) = Config.get_generic context exception_debugger;
5dfcc9697f29 support for ML_exception_debugger;
wenzelm
parents: 60730
diff changeset
    50
5dfcc9697f29 support for ML_exception_debugger;
wenzelm
parents: 60730
diff changeset
    51
60730
02c2860fcf30 added option ML_debugger;
wenzelm
parents: 57834
diff changeset
    52
(* debugger *)
02c2860fcf30 added option ML_debugger;
wenzelm
parents: 57834
diff changeset
    53
64556
851ae0e7b09c more symbols;
wenzelm
parents: 62878
diff changeset
    54
val debugger_raw = Config.declare_option ("ML_debugger", \<^here>);
60730
02c2860fcf30 added option ML_debugger;
wenzelm
parents: 57834
diff changeset
    55
val debugger = Config.bool debugger_raw;
02c2860fcf30 added option ML_debugger;
wenzelm
parents: 57834
diff changeset
    56
02c2860fcf30 added option ML_debugger;
wenzelm
parents: 57834
diff changeset
    57
fun debugger_enabled NONE =
02c2860fcf30 added option ML_debugger;
wenzelm
parents: 57834
diff changeset
    58
      (Options.default_bool (Config.name_of debugger_raw) handle ERROR _ => false)
02c2860fcf30 added option ML_debugger;
wenzelm
parents: 57834
diff changeset
    59
  | debugger_enabled (SOME context) = Config.get_generic context debugger;
02c2860fcf30 added option ML_debugger;
wenzelm
parents: 57834
diff changeset
    60
56303
4cc3f4db3447 clarified Isabelle/ML bootstrap, such that Execution does not require ML_Compiler;
wenzelm
parents:
diff changeset
    61
end;