Skip to content

Commit

Permalink
Merge pull request #126 from SkySkimmer/template-univs-dupl
Browse files Browse the repository at this point in the history
Adapt to coq/coq#19233 (template_universes don't duplicate level data)
  • Loading branch information
ppedrot authored Jun 28, 2024
2 parents 66fd506 + 8696083 commit 5e9bbe7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/parametricity.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1064,17 +1064,17 @@ let get_arity t =

(* Workaround to ensure that template universe levels are linear *)
let fix_template_params order evdr env temp b params =
let templ = List.rev temp.template_param_levels in
let templ = List.rev temp.template_param_arguments in
(* For all template levels generate fresh levels for all translated parameters *)
let rec freshen umap templ params = match templ with
| [] ->
let () = assert (List.is_empty params) in
umap, []
| None :: templ ->
| false :: templ ->
let decls, params = List.chop (order + 1) params in
let umap, params = freshen umap templ params in
umap, decls @ params
| Some _ :: templ ->
| true :: templ ->
let decls, params = List.chop (order + 1) params in
let umap, params = freshen umap templ params in
let rel, pdecls = match decls with
Expand Down

0 comments on commit 5e9bbe7

Please sign in to comment.