diff options
| author | Pierre-Marie Pédrot | 2014-06-07 00:28:29 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2014-06-07 01:20:25 +0200 |
| commit | 24a0df63c1844c6f2c69f9644a3059d668fd1e6f (patch) | |
| tree | 950372175994d0f5211b984a63bfee039cac4ebe /lib/control.mli | |
| parent | e6a7182526a47f4010274128c30407ed57e51339 (diff) | |
Adding a new Control file centralizing the control options of Coq.
Diffstat (limited to 'lib/control.mli')
| -rw-r--r-- | lib/control.mli | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/control.mli b/lib/control.mli new file mode 100644 index 0000000000..36c8349152 --- /dev/null +++ b/lib/control.mli @@ -0,0 +1,26 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2012 *) +(* \VV/ **************************************************************) +(* // * This file is distributed under the terms of the *) +(* * GNU Lesser General Public License Version 2.1 *) +(************************************************************************) + +(** Global control of Coq. *) + +val interrupt : bool ref +(** Coq interruption: set the following boolean reference to interrupt Coq + (it eventually raises [Break], simulating a Ctrl-C) *) + +val check_for_interrupt : unit -> unit +(** Use this function as a potential yield function. If {!interrupt} has been + set, il will raise [Sys.Break]. *) + +val timeout : int -> (unit -> 'a) -> exn -> 'a +(** [timeout n f e] tries to compute [f], and if it fails to do so before [n] + seconds, it raises [e] instead. *) + +type timeout = { timeout : 'a. int -> (unit -> 'a) -> exn -> 'a } + +val set_timeout : timeout -> unit +(** Set a particular timeout function. *) |
