aboutsummaryrefslogtreecommitdiff
path: root/pretyping/typeclasses.mli
diff options
context:
space:
mode:
authorVincent Laporte2018-11-16 13:24:54 +0000
committerVincent Laporte2018-11-27 09:44:32 +0000
commit23fcb09d934bf77fe58f232d2c246a81fc76591f (patch)
tree2a618992d0e83001b53e87f8c50378f15a85fb52 /pretyping/typeclasses.mli
parentb2ed1bffb7601f6bcaf3a73c110a2783451a6e26 (diff)
[Typeclasses] Warn when RHS of `:>` is not a class
This introduces the warning “not-a-class” in the “typeclasses” category.
Diffstat (limited to 'pretyping/typeclasses.mli')
-rw-r--r--pretyping/typeclasses.mli5
1 files changed, 4 insertions, 1 deletions
diff --git a/pretyping/typeclasses.mli b/pretyping/typeclasses.mli
index 8bdac0a575..d00195678b 100644
--- a/pretyping/typeclasses.mli
+++ b/pretyping/typeclasses.mli
@@ -133,7 +133,10 @@ val remove_instance_hint : GlobRef.t -> unit
val solve_all_instances_hook : (env -> evar_map -> evar_filter -> bool -> bool -> bool -> evar_map) Hook.t
val solve_one_instance_hook : (env -> evar_map -> EConstr.types -> bool -> evar_map * EConstr.constr) Hook.t
-val declare_instance : hint_info option -> bool -> GlobRef.t -> unit
+(** Declares the given global reference as an instance of its type.
+ Does nothing — or emit a “not-a-class” warning if the [warn] argument is set —
+ when said type is not a registered type class. *)
+val declare_instance : ?warn:bool -> hint_info option -> bool -> GlobRef.t -> unit
(** Build the subinstances hints for a given typeclass object.