aboutsummaryrefslogtreecommitdiff
path: root/pretyping/typeclasses.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2020-09-30 13:21:02 +0200
committerPierre-Marie Pédrot2020-09-30 13:41:38 +0200
commitf16290030b48dedf3091334af4cd21a7df157381 (patch)
treed8719b40c6ab8e009816f1a6f4f74aa67c72eec3 /pretyping/typeclasses.ml
parente3a1cf35313bbc4eaca2a43f5fc95ca306bc45fa (diff)
Further simplification of the typeclass registration API.
Diffstat (limited to 'pretyping/typeclasses.ml')
-rw-r--r--pretyping/typeclasses.ml9
1 files changed, 6 insertions, 3 deletions
diff --git a/pretyping/typeclasses.ml b/pretyping/typeclasses.ml
index 78f04c99e5..fc71254a46 100644
--- a/pretyping/typeclasses.ml
+++ b/pretyping/typeclasses.ml
@@ -41,7 +41,11 @@ let get_solve_one_instance, solve_one_instance_hook = Hook.make ()
let resolve_one_typeclass ?(unique=get_typeclasses_unique_solutions ()) env evm t =
Hook.get get_solve_one_instance env evm t unique
-type direction = Backward
+type class_method = {
+ meth_name : Name.t;
+ meth_info : hint_info option;
+ meth_const : Constant.t option;
+}
(* This module defines type-classes *)
type typeclass = {
@@ -58,8 +62,7 @@ type typeclass = {
cl_props : Constr.rel_context;
(* The method implementations as projections. *)
- cl_projs : (Name.t * (direction * hint_info) option
- * Constant.t option) list;
+ cl_projs : class_method list;
cl_strict : bool;