20 val eval_result_command: eval -> Toplevel.transition |
20 val eval_result_command: eval -> Toplevel.transition |
21 val eval_result_state: eval -> Toplevel.state |
21 val eval_result_state: eval -> Toplevel.state |
22 val eval: Keyword.keywords -> Path.T -> (unit -> theory) -> |
22 val eval: Keyword.keywords -> Path.T -> (unit -> theory) -> |
23 blob list * int -> Document_ID.command -> Token.T list -> eval -> eval |
23 blob list * int -> Document_ID.command -> Token.T list -> eval -> eval |
24 type print |
24 type print |
25 val print0: (unit -> unit) -> eval -> print |
25 type print_fn = Toplevel.transition -> Toplevel.state -> unit |
|
26 val print0: {pri: int, print_fn: print_fn} -> eval -> print |
26 val print: bool -> (string * string list) list -> Keyword.keywords -> string -> |
27 val print: bool -> (string * string list) list -> Keyword.keywords -> string -> |
27 eval -> print list -> print list option |
28 eval -> print list -> print list option |
28 type print_fn = Toplevel.transition -> Toplevel.state -> unit |
|
29 type print_function = |
29 type print_function = |
30 {keywords: Keyword.keywords, command_name: string, args: string list, exec_id: Document_ID.exec} -> |
30 {keywords: Keyword.keywords, command_name: string, args: string list, exec_id: Document_ID.exec} -> |
31 {delay: Time.time option, pri: int, persistent: bool, strict: bool, print_fn: print_fn} option |
31 {delay: Time.time option, pri: int, persistent: bool, strict: bool, print_fn: print_fn} option |
32 val print_function: string -> print_function -> unit |
32 val print_function: string -> print_function -> unit |
33 val no_print_function: string -> unit |
33 val no_print_function: string -> unit |
340 make_print name_args {delay = NONE, pri = 0, persistent = false, |
340 make_print name_args {delay = NONE, pri = 0, persistent = false, |
341 strict = false, print_fn = fn _ => fn _ => Exn.reraise exn}; |
341 strict = false, print_fn = fn _ => fn _ => Exn.reraise exn}; |
342 |
342 |
343 in |
343 in |
344 |
344 |
345 fun print0 e = |
345 fun print0 {pri, print_fn} = |
346 make_print ("", [serial_string ()]) |
346 make_print ("", [serial_string ()]) |
347 {delay = NONE, pri = 0, persistent = true, strict = true, print_fn = fn _ => fn _ => e ()}; |
347 {delay = NONE, pri = pri, persistent = true, strict = true, print_fn = print_fn}; |
348 |
348 |
349 fun print command_visible command_overlays keywords command_name eval old_prints = |
349 fun print command_visible command_overlays keywords command_name eval old_prints = |
350 let |
350 let |
351 val print_functions = Synchronized.value print_functions; |
351 val print_functions = Synchronized.value print_functions; |
352 |
352 |