diff options
| author | Pierre-Marie Pédrot | 2020-06-10 15:49:33 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2020-06-19 15:56:56 +0200 |
| commit | 695ca081db78c250db58381027e49f4be701672e (patch) | |
| tree | 4a8eecb27a0997702c1b6f335f165179fbb01a62 /engine | |
| parent | 9cff67c4071fdc01cc09a4e23e56fbc634a6522c (diff) | |
Try to preserve more sharing in nf_evars_and_universes_opt_subst.
Diffstat (limited to 'engine')
| -rw-r--r-- | engine/univSubst.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engine/univSubst.ml b/engine/univSubst.ml index a691239ee2..92211d5f3d 100644 --- a/engine/univSubst.ml +++ b/engine/univSubst.ml @@ -131,9 +131,9 @@ let nf_evars_and_universes_opt_subst f subst = let rec aux c = match kind c with | Evar (evk, args) -> - let args = List.map aux args in - (match try f (evk, args) with Not_found -> None with - | None -> mkEvar (evk, args) + let args' = List.Smart.map aux args in + (match try f (evk, args') with Not_found -> None with + | None -> if args == args' then c else mkEvar (evk, args') | Some c -> aux c) | Const pu -> let pu' = subst_univs_fn_puniverses lsubst pu in |
