diff options
| author | Matthieu Sozeau | 2014-08-03 20:02:49 +0200 |
|---|---|---|
| committer | Matthieu Sozeau | 2014-08-03 23:39:01 +0200 |
| commit | 7002b3daca6da29eadf80019847630b8583c3daf (patch) | |
| tree | 9dcc3b618d33dd416805f70e878d71d007ddf4ff /pretyping/typeclasses.ml | |
| parent | 5de89439d459edd402328a1e437be4d8cd2e4f46 (diff) | |
Move to a representation of universe polymorphic constants using indices for variables.
Simplifies instantiation of constants/inductives, requiring less allocation and Map.find's.
Abstraction by variables is handled mostly inside the kernel but could be moved outside.
Diffstat (limited to 'pretyping/typeclasses.ml')
| -rw-r--r-- | pretyping/typeclasses.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pretyping/typeclasses.ml b/pretyping/typeclasses.ml index dd09d5b29a..67189e22d7 100644 --- a/pretyping/typeclasses.ml +++ b/pretyping/typeclasses.ml @@ -210,7 +210,7 @@ let discharge_class (_,cl) = in grs', discharge_rel_context subst 1 ctx @ ctx' in let cl_impl' = Lib.discharge_global cl.cl_impl in if cl_impl' == cl.cl_impl then cl else - let ctx, uctx = abs_context cl in + let ctx, usubst, uctx = abs_context cl in let ctx, subst = rel_of_variable_context ctx in let context = discharge_context ctx subst cl.cl_context in let props = discharge_rel_context subst (succ (List.length (fst cl.cl_context))) cl.cl_props in @@ -379,7 +379,7 @@ let remove_instance i = remove_instance_hint i.is_impl let declare_instance pri local glob = - let ty = Global.type_of_global_unsafe (*FIXME*) glob in + let ty = Global.type_of_global_unsafe glob in match class_of_constr ty with | Some (rels, ((tc,_), args) as _cl) -> add_instance (new_instance tc pri (not local) (Flags.use_polymorphic_flag ()) glob) |
