Skip to content

Commit

Permalink
Add "coq.env.query-extra-dep" external predicate
Browse files Browse the repository at this point in the history
  • Loading branch information
phikal committed Oct 21, 2023
1 parent c865bcf commit ace0641
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions coq-builtin.elpi
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,10 @@ external pred coq.env.projections i:inductive, o:list (option constant).
external pred coq.env.primitive-projections i:inductive,
o:list (option (pair projection int)).

% [coq.env.query-extra-dep Identifier File Name] Resolve the file name of an
% Extra Dependency
external pred coq.env.query-extra-dep i:id, o:option id.

% -- Sorts (and their universe level, if applicable) ----------------

% Warning: universe polymorphism has to be considered experimental *E* as
Expand Down
9 changes: 9 additions & 0 deletions src/coq_elpi_builtins.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2325,6 +2325,15 @@ denote the same x as before.|};
Some (c, np + na))))))),
DocAbove);

MLCode(Pred("coq.env.query-extra-dep",
In(id, "Identifier",
Out(option id, "File Name",
Easy "Resolve the file name of an Extra Dependency")),
(fun id _ ~depth ->
!: (try Some (ComExtraDeps.query_extra_dep (Names.Id.of_string id))
with Not_found -> None))),
DocAbove);

LPDoc "-- Sorts (and their universe level, if applicable) ----------------";
LPDoc {|Warning: universe polymorphism has to be considered experimental *E* as
a feature, not just as a set of APIs. Unfortunately some of the
Expand Down

0 comments on commit ace0641

Please sign in to comment.