ocaml / ocaml/dune

Allow to have a coq.extraction and coq.theory in the same directory

Open
#4,158 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

rocq
Dominant language
OCaml
Stars
1.9k
Forks
500
Avg merge
15h 21m
Merged PRs (30d)
277

Description

Desired Behavior

To the best of my knowledge, it is currently not possible to have a coq.theory and
and coq.extraction within the same directory.

The reason is the following: coq.extraction uses the flag -R . DuneExtraction even
if this flag is useless (if we had a Coq file in ., coq.extraction will not know how
to build it). But in addition it prevents the use case I propose.

If I am right, this flag can be safely removed, and if we do, my use case should work.

Example

See this test repository to have a complete example,

but in practice the dune file I am looking for to be able to write is

(coq.theory
  (modules :standard \ extract)
  (name Foo))

(coq.extraction
  (prelude extract)
  (extracted_modules extract)
  (theories Foo))

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked test repository and the example dune file to reproduce the conflict between coq.theory and coq.extraction in one directory. Inspect how the coq.extraction rule adds the -R . DuneExtraction flag, then verify whether removing it allows the example to build while preserving existing extraction behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.