aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel/class.ml
diff options
context:
space:
mode:
Diffstat (limited to 'toplevel/class.ml')
-rw-r--r--toplevel/class.ml10
1 files changed, 10 insertions, 0 deletions
diff --git a/toplevel/class.ml b/toplevel/class.ml
index 3096b6067..8bac0812e 100644
--- a/toplevel/class.ml
+++ b/toplevel/class.ml
@@ -329,6 +329,16 @@ let try_add_new_identity_coercion id stre ~source ~target =
let try_add_new_coercion_with_source ref stre ~source =
try_add_new_coercion_core ref stre (Some source) None false
+let add_coercion_hook stre ref =
+ try_add_new_coercion ref stre;
+ Options.if_verbose message
+ (string_of_qualid (shortest_qualid_of_global (Global.env()) ref)
+ ^ " is now a coercion")
+
+let add_subclass_hook stre ref =
+ let cl = class_of_ref ref in
+ try_add_new_coercion_subclass cl stre
+
(* try_add_new_class : global_reference -> strength -> unit *)
let class_of_global = function