Skip to content

Commit a8f8957

Browse files
4ever2yforster
authored andcommitted
Fix substitution during eta expansion of partial application
1 parent 22b93ed commit a8f8957

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

template-coq/theories/EtaExpand.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Section Eta.
5757
let prev_args := map (lift0 needed) args in
5858
let eta_args := rev_map tRel (seq 0 needed) in
5959
let remaining := firstn needed (skipn #|args| (rev (smash_context [] (decompose_prod_assum [] ty).1))) in
60-
let remaining_subst := subst_context (rev args) 0 remaining in
60+
let remaining_subst := rev (subst_context (rev args) 0 (rev remaining)) in
6161
fold_right (fun d b => Ast.tLambda d.(decl_name) d.(decl_type) b) (mkApps (lift0 needed t) (prev_args ++ eta_args)) remaining_subst.
6262

6363
Definition eta_constructor (ind : inductive) c u args :=

0 commit comments

Comments
 (0)