diff options
author | Emilio Jesus Gallego Arias <e+git@x80.org> | 2017-11-19 04:47:15 +0100 |
---|---|---|
committer | Emilio Jesus Gallego Arias <e+git@x80.org> | 2017-11-19 04:51:49 +0100 |
commit | a554519874c15d0a790082e5f15f3dc2419c6c38 (patch) | |
tree | fbca74c97943685e93e10b85de708cc7c54a7abe /interp/constrextern.ml | |
parent | edf1a8f36f75861b822081b3825357e122b6937d (diff) |
[lib] Minor pending cleanup to consolidate helper function.
While we are at it we refactor a few special cases of the helper.
Diffstat (limited to 'interp/constrextern.ml')
-rw-r--r-- | interp/constrextern.ml | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/interp/constrextern.ml b/interp/constrextern.ml index e1cf8f196..0ce672cc8 100644 --- a/interp/constrextern.ml +++ b/interp/constrextern.ml @@ -185,18 +185,8 @@ let with_universes f = Flags.with_option print_universes f let with_meta_as_hole f = Flags.with_option print_meta_as_hole f let without_symbols f = Flags.with_option print_no_symbol f -(* XXX: Where to put this in the library? Util maybe? *) -let protect_ref r nf f x = - let old_ref = !r in - r := nf !r; - try let res = f x in r := old_ref; res - with reraise -> - let reraise = Backtrace.add_backtrace reraise in - r := old_ref; - Exninfo.iraise reraise - let without_specific_symbols l = - protect_ref inactive_notations_table + Flags.with_modified_ref inactive_notations_table (fun tbl -> IRuleSet.(union (of_list l) tbl)) (**********************************************************************) |