Skip to content

Commit 351f48c

Browse files
authored
Better "cannot strip functional dependencies" message (#83)
Work around coq/coq#16716
1 parent e62ff4f commit 351f48c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Rewriter/Rewriter/Reify.v

+3-2
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,12 @@ Module Compilers.
213213
in @partial_lam_unif_rewrite_ruleTP_gen base ident var pident pident_arg_types value t p should_do_again true true.
214214
End with_var.
215215

216-
Ltac2 Type exn ::= [ Cannot_eliminate_functional_dependencies (constr) ].
216+
(** Use [message] rather than [constr] to work around COQBUG(https://github.com/coq/coq/issues/16716) *)
217+
Ltac2 Type exn ::= [ Cannot_eliminate_functional_dependencies (message) ].
217218
Ltac2 strip_functional_dependency (term : constr) : constr :=
218219
lazy_match! term with
219220
| fun _ => ?p => p
220-
| _ => Control.zero (Cannot_eliminate_functional_dependencies term)
221+
| _ => Control.zero (Cannot_eliminate_functional_dependencies (Message.of_constr term))
221222
end.
222223

223224
Ltac2 rec refine_reify_under_forall_types' (base : constr) (base_type : constr) (base_type_interp : constr) (ty_ctx : constr) (avoid : Fresh.Free.t) (cur_i : constr) (lem : constr) (cont : Fresh.Free.t -> constr (* ty_ctx *) -> constr (* cur_i *) -> constr (* lem *) -> unit) : unit :=

0 commit comments

Comments
 (0)