diff options
| author | Lasse Blaauwbroek | 2020-11-14 12:35:21 +0100 |
|---|---|---|
| committer | Lasse Blaauwbroek | 2020-11-22 11:18:52 +0100 |
| commit | 6eb6f55499647b9b5a72626839683f6dff9c1549 (patch) | |
| tree | f19236e8f9ee6be3f6e09ed354911b4b4ddd7d07 /pretyping | |
| parent | 9a93f5836a5f7bab81384314ac11ff0aac7d1b7f (diff) | |
Fix timeout by ensuring signal exceptions are not erroneously caught
Fixes #7430 and fixes #10968
This commit makes the following changes:
- Add an exception `Signal` used to convert OCaml signals to exceptions.
`Signal` is registered as critical in `CErrors` to avoid being caught in the
wrong `with` clauses.
- Make `Control.timeout` into a safer interface based on `option` instead of
exceptions.
- Modify `tclTIMEOUT` to fail with `CErrors.Timeout` instead of
`Logic_monad.Tac_timeout`, as was already advertised in the ocamldoc documentation.
- Removes `Logic_monad.Tac_timeout` altogether because it no longer has a use.
Diffstat (limited to 'pretyping')
| -rw-r--r-- | pretyping/unification.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pretyping/unification.ml b/pretyping/unification.ml index 982814fdfc..095ee61835 100644 --- a/pretyping/unification.ml +++ b/pretyping/unification.ml @@ -1943,7 +1943,7 @@ let w_unify_to_subterm_list env evd flags hdmeta oplist t = try (* First try finding a subterm w/o conversion on open terms *) let flags = set_no_delta_open_flags flags in w_unify_to_subterm env evd ~flags t' - with e -> + with e when CErrors.noncritical e -> (* If this fails, try with full conversion *) w_unify_to_subterm env evd ~flags t' else w_unify_to_subterm env evd ~flags t' |
