diff options
| author | Pierre-Marie Pédrot | 2020-10-21 12:14:08 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2020-10-21 12:14:08 +0200 |
| commit | 3f0b70956add7b5731052c485cec972372b0eff9 (patch) | |
| tree | d39ac75ebbeff8255cd696e31eaffaeeec4e31b4 /pretyping/typeclasses.ml | |
| parent | 135677207e3058efd9d1f5516429235de9093fb4 (diff) | |
| parent | e23be6ebc7d9c9842f8c1036e145fb15c3154e17 (diff) | |
Merge PR #13118: [type classes] Simplify cl_context
Reviewed-by: ppedrot
Diffstat (limited to 'pretyping/typeclasses.ml')
| -rw-r--r-- | pretyping/typeclasses.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pretyping/typeclasses.ml b/pretyping/typeclasses.ml index fc71254a46..51b228a640 100644 --- a/pretyping/typeclasses.ml +++ b/pretyping/typeclasses.ml @@ -56,7 +56,7 @@ type typeclass = { cl_impl : GlobRef.t; (* Context in which the definitions are typed. Includes both typeclass parameters and superclasses. *) - cl_context : GlobRef.t option list * Constr.rel_context; + cl_context : Constr.rel_context; (* Context of definitions and properties on defs, will not be shared *) cl_props : Constr.rel_context; @@ -97,7 +97,7 @@ let instances : instances ref = Summary.ref GlobRef.Map.empty ~name:"instances" let typeclass_univ_instance (cl, u) = assert (Univ.AUContext.size cl.cl_univs == Univ.Instance.length u); let subst_ctx c = Context.Rel.map (subst_instance_constr u) c in - { cl with cl_context = on_snd subst_ctx cl.cl_context; + { cl with cl_context = subst_ctx cl.cl_context; cl_props = subst_ctx cl.cl_props} let class_info env sigma c = @@ -178,7 +178,7 @@ let remove_instance inst = let instance_constructor (cl,u) args = - let lenpars = List.count is_local_assum (snd cl.cl_context) in + let lenpars = List.count is_local_assum cl.cl_context in let open EConstr in let pars = fst (List.chop lenpars args) in match cl.cl_impl with |
