Skip to content

Commit

Permalink
Better "cannot strip functional dependencies" message (#83)
Browse files Browse the repository at this point in the history
Work around coq/coq#16716
  • Loading branch information
JasonGross committed Oct 23, 2022
1 parent e62ff4f commit 351f48c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Rewriter/Rewriter/Reify.v
Expand Up @@ -213,11 +213,12 @@ Module Compilers.
in @partial_lam_unif_rewrite_ruleTP_gen base ident var pident pident_arg_types value t p should_do_again true true.
End with_var.

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

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 :=
Expand Down

0 comments on commit 351f48c

Please sign in to comment.