Skip to content

Commit 1d73de2

Browse files
committed
typecheck evar arguments instead of type
1 parent 0bdc85f commit 1d73de2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pretyping/typing.ml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -532,11 +532,10 @@ let rec execute env sigma cstr =
532532
match EConstr.kind sigma cstr with
533533
| Meta n -> assert false (* Typing should always be performed on meta-free terms *)
534534

535-
| Evar ev ->
535+
| Evar (_, args as ev) ->
536+
let sigma = SList.Skip.fold (fun sigma x -> fst (execute env sigma x)) sigma args in
536537
let ty = EConstr.existential_type sigma ev in
537-
let jty = Retyping.get_type_of env sigma ty in
538-
let sigma, jty = assumption_of_judgment env sigma { uj_val = ty; uj_type = jty } in
539-
sigma, { uj_val = cstr; uj_type = jty }
538+
sigma, { uj_val = cstr; uj_type = ty }
540539

541540
| Rel n ->
542541
sigma, judge_of_relative env n

0 commit comments

Comments
 (0)