Skip to content

Commit

Permalink
Merge pull request #29 from coq-community/doc
Browse files Browse the repository at this point in the history
📝 Doc on do-not-fail
  • Loading branch information
ecranceMERCE authored Jan 19, 2024
2 parents 95f083a + 98f9581 commit aff92c4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions elpi/util.elpi
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
% utility predicates
% -----------------------------------------------------------------------------

% Some of the Coq native predicates raise errors in Elpi, stopping all
% ongoing computations. Adding a custom flag like do-not-fail gives us an
% extra catch-all case in the native predicate, when this flag is active,
% meaning the predicate will just not succeed, instead of raising an error.
pred do-not-fail.
:before "term->gref:fail"
coq.term->gref _ _ :- do-not-fail, !, false.
Expand Down

0 comments on commit aff92c4

Please sign in to comment.