-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[meta] [coq] Support for installed theories coordination issue. #6982
Comments
I don't understand how this would work. |
What it is what you don't understand, the idea is:
|
@ejgallego yes but how do we query coqc without the super context? |
The same way |
@rgrinberg what is a sensible way to call |
Using |
I'm opening this issue to summarize discussions with Ali and Rudi about the main missing piece for the 1.0 Coq Theory support (cc: #1998) which is detection of installed theories.
As of today, Coq uses a very simple install layout where a theory
Foo.Bar
is installed under$lib/coq/user-contrib/Foo/Bar
; this is a model we want to move away from, but for 1.0 we need compatiblity both ways: Coq theories usingcoq_makefile
need to be able to usedune
-based theories, and viceversa.The idea for the first prototype is to generate a theory for each (sub)-directory found in
user-contrib
, thus, if we have:we generate 3 theories, and users can refer to any of the three.
Then,
coqc
is always called with-boot -R Coq $lib/coq/theories -Q mc.alg $lib/user-contrib/mc/alg
for example.-boot
is essential.This scheme has a great advantage, in the sense that it makes
-boot
the default for Dune rules, and will simplify a lot of code.I think we should also require users to depend on
Coq
explicitly, that is to say, the standard library, and deprecate the(stdlib )
theory flag.We can see two technical challenges:
$lib/user-contrib
may be expensive; but I'd suggest to do a first eager implementation before going to a lazy scan, which I think is possibleinstalled_theories
DB needs to callcoqc
to find out the location of$lib/coq
at scope creation time; this is tricky as we can't resolve the binary fully yet. However, I think that is not a problem, because in the casecoq
itself is in the workspace scope (and thus we can't resolve it), the set of installed_libs should be empty.Another flag I'd add to this first prototype is
implicit_stdlib
, which would allow users to select-Q
or-R
for theCoq
namespace, in preparation for making-Q
the default upstream (cc: coq/coq#16091 )The text was updated successfully, but these errors were encountered: