src/Pure/PIDE/document.ML
changeset 44478 4fdb1009a370
parent 44476 e8a87398f35d
child 44479 9a04e7502e22
equal deleted inserted replaced
44477:086bb1083552 44478:4fdb1009a370
     1 (*  Title:      Pure/PIDE/document.ML
     1 (*  Title:      Pure/PIDE/document.ML
     2     Author:     Makarius
     2     Author:     Makarius
     3 
     3 
     4 Document as collection of named nodes, each consisting of an editable
     4 Document as collection of named nodes, each consisting of an editable
     5 list of commands, associated with asynchronous execution process.
     5 list of commands, with asynchronous read/eval/print processes.
     6 *)
     6 *)
     7 
     7 
     8 signature DOCUMENT =
     8 signature DOCUMENT =
     9 sig
     9 sig
    10   type id = int
    10   type id = int
   263     let
   263     let
   264       val id_string = print_id id;
   264       val id_string = print_id id;
   265       val tr =
   265       val tr =
   266         Future.fork_pri 2 (fn () =>
   266         Future.fork_pri 2 (fn () =>
   267           Position.setmp_thread_data (Position.id_only id_string)
   267           Position.setmp_thread_data (Position.id_only id_string)
   268             (fn () => Outer_Syntax.prepare_command (Position.id id_string) text) ());
   268             (fn () => Outer_Syntax.read_command (Position.id id_string) text) ());
   269       val commands' =
   269       val commands' =
   270         Inttab.update_new (id, tr) commands
   270         Inttab.update_new (id, tr) commands
   271           handle Inttab.DUP dup => err_dup "command" dup;
   271           handle Inttab.DUP dup => err_dup "command" dup;
   272     in (versions, commands', execs, execution) end);
   272     in (versions, commands', execs, execution) end);
   273 
   273