diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2017-04-06 17:34:23 +0200 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2017-04-06 17:54:41 +0200 |
commit | d6175b9980808ff91f1299ca26a9a49a117169ca (patch) | |
tree | f4bf86dc768b66e37d4519f771222f08c5fad333 /library/keys.ml | |
parent | 2794b3c91bbbef115303b40f2e494ad97467dc9e (diff) |
Fix a normalization hotspot in computation of constr keys.
Getting a key only needs to observe the root of a term. This hotspot was
observed in HoTT.
Diffstat (limited to 'library/keys.ml')
-rw-r--r-- | library/keys.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/keys.ml b/library/keys.ml index 057dc3b65..c9e325ee5 100644 --- a/library/keys.ml +++ b/library/keys.ml @@ -114,11 +114,11 @@ let inKeys : key_obj -> obj = let declare_equiv_keys ref ref' = Lib.add_anonymous_leaf (inKeys (ref,ref')) -let constr_key c = +let constr_key kind c = let open Globnames in try let rec aux k = - match kind_of_term k with + match kind k with | Const (c, _) -> KGlob (ConstRef c) | Ind (i, u) -> KGlob (IndRef i) | Construct (c,u) -> KGlob (ConstructRef c) |