A colleague asked if it could work (which seems hard), but I've also seen noise recently about writing Coq's own Coq rules outside the core (in dune)?
What's the use case?
Indeed it is hard as of now, beyond the parameters we expose
Dune build language is declarative
users do specify what to build
not how to build it
that's private to the implementation [for obvious reasons]
indeed we have a coq_dune generator, that we used to port Coq, that works super well, in this scenario Dune becomes a generic low-level build system such as others that are popular
we plan to ressurect it
The specific example was timing invocations, and recover the timing even on cached builds.
But more generally, I'm going to invoke the "Growing a Language" argument by Guy Steele: nobody can possibly support all use-cases of the entire community.
There is always a tradeoff
indeed Dune doesn't mean to support all use cases I think
but timing is indeed one we should add
(and as it happens, there are open feature requests even for lots of standard usecases)
Dune is opinionated, so it takes a particular tradeoff
you can go a different route but then you lose some advantages
low level rules for example hardly compose
but I agree that is good to support both cases, so coq_dune should be made to the public
now the problem is that I have little time to work on it for now :S
hopefully we can get some help at Inria
is the existing code available somewhere?
even if it doesn't work, it might be useful as a starting point.
Yes it is!
It's a bit in flux tho I recommend potential users to meet with me like 30 mins so we clean it up and put it back in the Coq repos
latest version is in a PR
https://github.com/coq/coq/pull/13364/files
here it is, under test-suite tools
test_suite/tools/gen_rules
sorry
It is pretty easy; so we could move that to a different tree and merge it easily
Paolo Giarrusso said:
A colleague asked if it could work (which seems hard), but I've also seen noise recently about writing Coq's own Coq rules outside the core (in dune)?
What language would you propose instead of OCaml?
Just to expand on what Emilio is saying, dune offers more than just an engine that runs build rules. For example, dune understand what libraries are and how to resolve them in a way that works transparently for installed/local libraries. Coq would gain a lot if it reused all these tried & tested components.
Last updated: Jun 03 2023 at 17:29 UTC