diff options
| author | Pierre-Marie Pédrot | 2020-03-11 10:02:17 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2020-03-11 10:02:17 +0100 |
| commit | 45e83041ee129a541fdf17a8c50dd6e9e0e81262 (patch) | |
| tree | 27ce0770df7c30aca0225ce5a9fbff02b508b288 /pretyping | |
| parent | baae1974d5ee15233cddffa1281d4a23fc74cc9f (diff) | |
| parent | 15eb6b5721aaff1281f1f71e00c98fd9a39511e0 (diff) | |
Merge PR #11769: Fix #9930: "change" replaces 0-param projections by constants
Reviewed-by: ppedrot
Diffstat (limited to 'pretyping')
| -rw-r--r-- | pretyping/tacred.ml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pretyping/tacred.ml b/pretyping/tacred.ml index 4afed07eda..fdf0db9909 100644 --- a/pretyping/tacred.ml +++ b/pretyping/tacred.ml @@ -1009,11 +1009,11 @@ let change_map_constr_with_binders_left_to_right g f (env, l as acc) sigma c = let app = (mkApp (hdf, Array.sub al 0 (Array.length al - 1))) in let app' = f acc app in let a' = f acc a in - (match EConstr.kind sigma app' with - | App (hdf', al') when hdf' == hdf -> - (* Still the same projection, we ignore the change in parameters *) - mkProj (p, a') - | _ -> mkApp (app', [| a' |])) + let hdf', _ = decompose_app_vect sigma app' in + if hdf' == hdf then + (* Still the same projection, we ignore the change in parameters *) + mkProj (p, a') + else mkApp (app', [| a' |]) | _ -> map_constr_with_binders_left_to_right sigma g f acc c let e_contextually byhead (occs,c) f = begin fun env sigma t -> |
