diff options
| author | Pierre-Marie Pédrot | 2017-04-06 17:34:23 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2017-04-06 17:54:41 +0200 |
| commit | d6175b9980808ff91f1299ca26a9a49a117169ca (patch) | |
| tree | f4bf86dc768b66e37d4519f771222f08c5fad333 /pretyping | |
| 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 'pretyping')
| -rw-r--r-- | pretyping/unification.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pretyping/unification.ml b/pretyping/unification.ml index 91781a0769..eb90dfbdb6 100644 --- a/pretyping/unification.ml +++ b/pretyping/unification.ml @@ -1739,7 +1739,7 @@ let keyed_unify env evd kop = | None -> fun _ -> true | Some kop -> fun cl -> - let kc = Keys.constr_key (EConstr.to_constr evd cl) in + let kc = Keys.constr_key (fun c -> EConstr.kind evd c) cl in match kc with | None -> false | Some kc -> Keys.equiv_keys kop kc @@ -1749,7 +1749,7 @@ let keyed_unify env evd kop = Fails if no match is found *) let w_unify_to_subterm env evd ?(flags=default_unify_flags ()) (op,cl) = let bestexn = ref None in - let kop = Keys.constr_key (EConstr.to_constr evd op) in + let kop = Keys.constr_key (fun c -> EConstr.kind evd c) op in let rec matchrec cl = let cl = strip_outer_cast evd cl in (try |
