aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel/search.ml
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-10-11 09:06:05 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-10-11 09:06:05 +0000
commite79b800bec660dc2724fa70c33f4e435ddbf885c (patch)
tree79e24c31e9c2319649b7872b1bcb0ad6867afe09 /toplevel/search.ml
parent2484db1991dac3b41d70130cf4c8697cb8c4af9a (diff)
Various simplifications about constant_of_delta and mind_of_delta
Most of the time, a constant name is built from: - a kernel_name for its user part - a delta_resolver applied to this kernel_name for its canonical part With this patch we avoid building unnecessary constants for immediately amending them (cf in particular the awkward code removed in safe_typing). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14545 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'toplevel/search.ml')
-rw-r--r--toplevel/search.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/toplevel/search.ml b/toplevel/search.ml
index 7b5d770d2..33e8e51db 100644
--- a/toplevel/search.ml
+++ b/toplevel/search.ml
@@ -65,14 +65,14 @@ let gen_crible refopt (fn : global_reference -> env -> constr -> unit) =
fn (VarRef id) env typ
with Not_found -> (* we are in a section *) ())
| "CONSTANT" ->
- let cst = Global.constant_of_delta(constant_of_kn kn) in
+ let cst = Global.constant_of_delta_kn kn in
let typ = Typeops.type_of_constant env cst in
if refopt = None
|| head_const typ = constr_of_global (Option.get refopt)
then
fn (ConstRef cst) env typ
| "INDUCTIVE" ->
- let mind = Global.mind_of_delta(mind_of_kn kn) in
+ let mind = Global.mind_of_delta_kn kn in
let mib = Global.lookup_mind mind in
(match refopt with
| Some (IndRef ((kn',tyi) as ind)) when eq_mind mind kn' ->