| 1 |
If we have installed theories A.B and A.C then Dune should not complain that A |
| 2 |
is a duplicate theory. |
| 3 |
|
| 4 |
First we install our two theories with the conflicting name prefix. |
| 5 |
|
| 6 |
$ (cd B && dune build @install && dune install --prefix .) |
| 7 |
$ (cd C && dune build @install && dune install --prefix .) |
| 8 |
|
| 9 |
We add these to ROCQPATH |
| 10 |
|
| 11 |
$ export ROCQPATH=../B/lib/coq/user-contrib:../C/lib/coq/user-contrib:${ROCQPATH:-} |
| 12 |
|
| 13 |
Now we create a theory that depends on both |
| 14 |
|
| 15 |
$ mkdir mytheory && cd mytheory |
| 16 |
|
| 17 |
$ cat > dune-project << EOF |
| 18 |
> (lang dune 3.21) |
| 19 |
> (using rocq 0.11) |
| 20 |
> EOF |
| 21 |
|
| 22 |
$ cat > dune << EOF |
| 23 |
> (rocq.theory |
| 24 |
> (name mytheory) |
| 25 |
> (theories A.B A.C)) |
| 26 |
> EOF |
| 27 |
|
| 28 |
$ cat > a.v << EOF |
| 29 |
> From A.B Require Import a. |
| 30 |
> From A.C Require Import a. |
| 31 |
> Print b. |
| 32 |
> EOF |
| 33 |
|
| 34 |
$ dune build a.vo |
| 35 |
Inductive b : Prop := . |
| 36 |
|