aboutsummaryrefslogtreecommitdiff
path: root/proofs/proof_errors.mli
diff options
context:
space:
mode:
authoraspiwack2013-11-02 15:35:34 +0000
committeraspiwack2013-11-02 15:35:34 +0000
commite6404437c1f6ae451f4253cd3450f75513b395c3 (patch)
treeb8fae579662002cd7a921aa6baa5af6d920204a4 /proofs/proof_errors.mli
parent15effb7dedbaa407bbe25055da6efded366dd3b1 (diff)
Replaced monads.ml by an essentially equivalent proofview_gen.ml generated by extraction.
The goal was to use Coq's partial evaluation capabilities to do manually some inlining that Ocaml couldn't do. It may be critical as we are defining higher order combinators in term of others and no inlining means a lot of unnecessary, short-lived closures built. With this modification we get back some (but not all) of the loss of performance introduced by threading the monadic type all over the place. I still have an estimated 15% longer compilation time for Coq. Makes use of Set Extraction Conservative Types and Set Extraction File Comment to maintain the relationship between the functions and their types. Uses an intermediate layer Proofview_monad between Proofview_gen and Proofview in order to use a hand-written mli to catch potential errors in the generated file (it uses Extract Constant a lot). A bug in the extraction of signatures forces to remove the generated proofview_gen.mli which does not have the correct types. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16981 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'proofs/proof_errors.mli')
-rw-r--r--proofs/proof_errors.mli18
1 files changed, 18 insertions, 0 deletions
diff --git a/proofs/proof_errors.mli b/proofs/proof_errors.mli
new file mode 100644
index 0000000000..dd21d539c9
--- /dev/null
+++ b/proofs/proof_errors.mli
@@ -0,0 +1,18 @@
+(** This small files declares the exceptions needed by Proofview_gen,
+ as Coq's extraction cannot produce exception declarations. *)
+
+(** To help distinguish between exceptions raised by the IO monad from
+ the one used natively by Coq, the former are wrapped in
+ [Exception]. It is only used internally so that [catch] blocks of
+ the IO monad would only catch exceptions raised by the [raise]
+ function of the IO monad, and not for instance, by system
+ interrupts. Also used in [Proofview] to avoid capturing exception
+ from the IO monad ([Proofview] catches errors in its compatibility
+ layer, and when lifting goal-level expressions). *)
+exception Exception of exn
+(** This exception is used to signal abortion in [timeout] functions. *)
+exception Timeout
+(** This exception is used by the tactics to signal failure by lack of
+ successes, rather than some other exceptions (like system
+ interrupts). *)
+exception TacticFailure of exn