src/Pure/PIDE/isar_document.ML
changeset 43713 1ba5331b4623
parent 43668 aad4f1956098
child 43722 9b5dadb0c28d
     1.1 --- a/src/Pure/PIDE/isar_document.ML	Fri Jul 08 21:44:47 2011 +0200
     1.2 +++ b/src/Pure/PIDE/isar_document.ML	Fri Jul 08 22:00:53 2011 +0200
     1.3 @@ -4,26 +4,16 @@
     1.4  Protocol message formats for interactive Isar documents.
     1.5  *)
     1.6  
     1.7 -signature ISAR_DOCUMENT =
     1.8 -sig
     1.9 -  val state: unit -> Document.state
    1.10 -end
    1.11 -
    1.12 -structure Isar_Document: ISAR_DOCUMENT =
    1.13 +structure Isar_Document: sig end =
    1.14  struct
    1.15  
    1.16 -val global_state = Synchronized.var "Isar_Document" Document.init_state;
    1.17 -val change_state = Synchronized.change global_state;
    1.18 -
    1.19 -fun state () = Synchronized.value global_state;
    1.20 -
    1.21  val _ =
    1.22    Isabelle_Process.add_command "Isar_Document.define_command"
    1.23 -    (fn [id, text] => change_state (Document.define_command (Document.parse_id id) text));
    1.24 +    (fn [id, text] => Document.change_state (Document.define_command (Document.parse_id id) text));
    1.25  
    1.26  val _ =
    1.27    Isabelle_Process.add_command "Isar_Document.edit_version"
    1.28 -    (fn [old_id_string, new_id_string, edits_yxml] => change_state (fn state =>
    1.29 +    (fn [old_id_string, new_id_string, edits_yxml] => Document.change_state (fn state =>
    1.30        let
    1.31          val old_id = Document.parse_id old_id_string;
    1.32          val new_id = Document.parse_id new_id_string;