src/Pure/PIDE/execution.ML
changeset 56305 06dcec23fb8d
parent 56304 40274e4f5ebf
child 56333 38f1422ef473
     1.1 --- a/src/Pure/PIDE/execution.ML	Thu Mar 27 17:56:13 2014 +0100
     1.2 +++ b/src/Pure/PIDE/execution.ML	Thu Mar 27 18:42:53 2014 +0100
     1.3 @@ -17,7 +17,7 @@
     1.4    val terminate: Document_ID.exec -> unit
     1.5    type params = {name: string, pos: Position.T, pri: int}
     1.6    val fork: params -> (unit -> 'a) -> 'a future
     1.7 -  val print: params -> (serial -> unit) -> unit
     1.8 +  val print: params -> (unit -> unit) -> unit
     1.9    val fork_prints: Document_ID.exec -> unit
    1.10    val purge: Document_ID.exec list -> unit
    1.11    val reset: unit -> Future.group list
    1.12 @@ -135,12 +135,11 @@
    1.13  
    1.14  (* print *)
    1.15  
    1.16 -fun print ({name, pos, pri}: params) pr =
    1.17 +fun print ({name, pos, pri}: params) e =
    1.18    change_state (apsnd (fn execs =>
    1.19      let
    1.20        val exec_id = the_default 0 (Position.parse_id pos);
    1.21 -      val i = serial ();
    1.22 -      val print = {name = name, pri = pri, body = fn () => pr i};
    1.23 +      val print = {name = name, pri = pri, body = e};
    1.24      in
    1.25        (case Inttab.lookup execs exec_id of
    1.26          SOME (groups, prints) => Inttab.update (exec_id, (groups, print :: prints)) execs