src/Pure/General/output_primitives.ML
author wenzelm
Thu, 09 Feb 2017 15:40:34 +0100
changeset 65009 eda9366bbfac
parent 62933 f14569a9ab93
child 65301 fca593a62785
permissions -rw-r--r--
remote database access via ssh port forwarding;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
62930
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
     1
(*  Title:      Pure/General/output_primitives.ML
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
     2
    Author:     Makarius
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
     3
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
     4
Primitives for Isabelle output channels.
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
     5
*)
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
     6
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
     7
signature OUTPUT_PRIMITIVES =
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
     8
sig
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
     9
  type output = string
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    10
  type serial = int
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    11
  type properties = (string * string) list
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    12
  val writeln_fn: output list -> unit
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    13
  val state_fn: output list -> unit
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    14
  val information_fn: output list -> unit
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    15
  val tracing_fn: output list -> unit
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    16
  val warning_fn: output list -> unit
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    17
  val legacy_fn: output list -> unit
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    18
  val error_message_fn: serial * output list -> unit
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    19
  val system_message_fn: output list -> unit
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    20
  val status_fn: output list -> unit
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    21
  val report_fn: output list -> unit
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    22
  val result_fn: properties -> output list -> unit
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    23
  val protocol_message_fn: properties -> output list -> unit
62933
f14569a9ab93 proper output of markup, e.g. relevant for nested ML as used in Pure/System/bash.ML;
wenzelm
parents: 62930
diff changeset
    24
  val markup_fn: string * properties -> output * output
62930
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    25
end;
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    26
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    27
structure Output_Primitives: OUTPUT_PRIMITIVES =
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    28
struct
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    29
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    30
type output = string;
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    31
type serial = int;
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    32
type properties = (string * string) list;
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    33
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    34
fun ignore_outputs (_: output list) = ();
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    35
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    36
val writeln_fn = ignore_outputs;
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    37
val state_fn = ignore_outputs;
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    38
val information_fn = ignore_outputs;
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    39
val tracing_fn = ignore_outputs;
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    40
val warning_fn = ignore_outputs;
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    41
val legacy_fn = ignore_outputs;
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    42
fun error_message_fn (_: serial, _: output list) = ();
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    43
val system_message_fn = ignore_outputs;
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    44
val status_fn = ignore_outputs;
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    45
val report_fn = ignore_outputs;
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    46
fun result_fn (_: properties) = ignore_outputs;
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    47
fun protocol_message_fn (_: properties) = ignore_outputs;
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    48
62933
f14569a9ab93 proper output of markup, e.g. relevant for nested ML as used in Pure/System/bash.ML;
wenzelm
parents: 62930
diff changeset
    49
fun markup_fn (_: string * properties) = ("", "");
f14569a9ab93 proper output of markup, e.g. relevant for nested ML as used in Pure/System/bash.ML;
wenzelm
parents: 62930
diff changeset
    50
62930
51ac6bc389e8 shared output primitives of physical/virtual Pure;
wenzelm
parents:
diff changeset
    51
end;