src/Tools/try.ML
changeset 62519 a564458f94db
parent 62505 9e2a65912111
child 63690 48a2c88091d7
equal deleted inserted replaced
62518:b8efcc9edd7b 62519:a564458f94db
   108               val state = Toplevel.proof_of st
   108               val state = Toplevel.proof_of st
   109                 |> Proof.map_context (Context_Position.set_visible false)
   109                 |> Proof.map_context (Context_Position.set_visible false)
   110               val auto_time_limit = Options.default_real @{system_option auto_time_limit}
   110               val auto_time_limit = Options.default_real @{system_option auto_time_limit}
   111             in
   111             in
   112               if auto_time_limit > 0.0 then
   112               if auto_time_limit > 0.0 then
   113                 (case TimeLimit.timeLimit (seconds auto_time_limit) (fn () => tool true state) () of
   113                 (case Timeout.apply (seconds auto_time_limit) (fn () => tool true state) () of
   114                   (true, (_, outcome)) => List.app Output.information outcome
   114                   (true, (_, outcome)) => List.app Output.information outcome
   115                 | _ => ())
   115                 | _ => ())
   116               else ()
   116               else ()
   117             end handle exn => if Exn.is_interrupt exn then Exn.reraise exn else ()}
   117             end handle exn => if Exn.is_interrupt exn then Exn.reraise exn else ()}
   118       else NONE)
   118       else NONE)