aboutsummaryrefslogtreecommitdiff
path: root/plugins/setoid_ring
diff options
context:
space:
mode:
authorMaxime Dénès2018-07-19 11:41:48 +0200
committerMaxime Dénès2018-12-12 18:41:11 +0100
commit264c208a5eb824c880ef4c46e060185470064df5 (patch)
treece99aabb06f6232d4ecfd2117269d827df24463c /plugins/setoid_ring
parentdfd4c4a2b50edf894a19cd50c43517e1804eadc9 (diff)
Higher-level libobject API for objects with fixed scopes
Diffstat (limited to 'plugins/setoid_ring')
-rw-r--r--plugins/setoid_ring/newring.ml19
1 files changed, 6 insertions, 13 deletions
diff --git a/plugins/setoid_ring/newring.ml b/plugins/setoid_ring/newring.ml
index 9fea3ddcda..65201d922f 100644
--- a/plugins/setoid_ring/newring.ml
+++ b/plugins/setoid_ring/newring.ml
@@ -394,13 +394,9 @@ let subst_th (subst,th) =
let theory_to_obj : ring_info -> obj =
let cache_th (name,th) = add_entry name th in
- declare_object
- {(default_object "tactic-new-ring-theory") with
- open_function = (fun i o -> if Int.equal i 1 then cache_th o);
- cache_function = cache_th;
- subst_function = subst_th;
- classify_function = (fun x -> Substitute x)}
-
+ declare_object @@ global_object_nodischarge "tactic-new-ring-theory"
+ ~cache:cache_th
+ ~subst:(Some subst_th)
let setoid_of_relation env evd a r =
try
@@ -891,12 +887,9 @@ let subst_th (subst,th) =
let ftheory_to_obj : field_info -> obj =
let cache_th (name,th) = add_field_entry name th in
- declare_object
- {(default_object "tactic-new-field-theory") with
- open_function = (fun i o -> if Int.equal i 1 then cache_th o);
- cache_function = cache_th;
- subst_function = subst_th;
- classify_function = (fun x -> Substitute x) }
+ declare_object @@ global_object_nodischarge "tactic-new-field-theory"
+ ~cache:cache_th
+ ~subst:(Some subst_th)
let field_equality evd r inv req =
match EConstr.kind !evd req with