forked from ocaml/dune
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create (stdlib) syntax for Coq stanza
Fixes ocaml#6163 Signed-off-by: Lasse Blaauwbroek <[email protected]>
- Loading branch information
1 parent
9b722bb
commit 9f30645
Showing
24 changed files
with
112 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
test/blackbox-tests/test-cases/coq/compose-boot-nostdlib.t/A/a.v
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Print LoadPath. | ||
Fail Print Prelude. | ||
From Coq Require Import Prelude. | ||
Print Prelude. | ||
Require Import mytheory. | ||
Check Hello. |
4 changes: 4 additions & 0 deletions
4
test/blackbox-tests/test-cases/coq/compose-boot-nostdlib.t/A/dune
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(coq.theory | ||
(name A) | ||
(stdlib no) | ||
(theories Coq)) |
2 changes: 2 additions & 0 deletions
2
test/blackbox-tests/test-cases/coq/compose-boot-nostdlib.t/A/dune-project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(lang dune 3.5) | ||
(using coq 0.6) |
4 changes: 4 additions & 0 deletions
4
test/blackbox-tests/test-cases/coq/compose-boot-nostdlib.t/B/b.v
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Print LoadPath. | ||
Print Prelude. | ||
Require Import mytheory. | ||
Check Hello. |
4 changes: 4 additions & 0 deletions
4
test/blackbox-tests/test-cases/coq/compose-boot-nostdlib.t/B/dune
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(coq.theory | ||
(name B) | ||
(stdlib yes) | ||
(theories Coq)) |
2 changes: 2 additions & 0 deletions
2
test/blackbox-tests/test-cases/coq/compose-boot-nostdlib.t/B/dune-project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(lang dune 3.5) | ||
(using coq 0.6) |
Empty file.
2 changes: 2 additions & 0 deletions
2
test/blackbox-tests/test-cases/coq/compose-boot-nostdlib.t/Coq/Init/Prelude.v
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Unset Elimination Schemes. | ||
Inductive BootType := boot | type. |
6 changes: 6 additions & 0 deletions
6
test/blackbox-tests/test-cases/coq/compose-boot-nostdlib.t/Coq/dune
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(coq.theory | ||
(name Coq) | ||
(package Coq) | ||
(boot)) | ||
|
||
(include_subdirs qualified) |
2 changes: 2 additions & 0 deletions
2
test/blackbox-tests/test-cases/coq/compose-boot-nostdlib.t/Coq/dune-project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(lang dune 3.3) | ||
(using coq 0.4) |
2 changes: 2 additions & 0 deletions
2
test/blackbox-tests/test-cases/coq/compose-boot-nostdlib.t/Coq/mytheory.v
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
Inductive Hello := World | Bye. |
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/coq/compose-boot-nostdlib.t/dune-workspace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(lang dune 3.3) |
36 changes: 36 additions & 0 deletions
36
test/blackbox-tests/test-cases/coq/compose-boot-nostdlib.t/run.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Testing composition of theories accross a dune workspace with a boot library and | ||
importing stdlib enabled or disabled. | ||
|
||
Composing a library A depending on Coq but having `(stdlib no)`: | ||
|
||
$ dune build A | ||
Logical Path / Physical path: | ||
A | ||
$TESTCASE_ROOT/_build/default/A | ||
Coq | ||
$TESTCASE_ROOT/_build/default/Coq | ||
Coq.Init | ||
$TESTCASE_ROOT/_build/default/Coq/Init | ||
Module | ||
Prelude | ||
:= Struct Inductive BootType : Set := boot : BootType | type : BootType. End | ||
|
||
Hello | ||
: Set | ||
|
||
Composing a library B depending on Coq but having `(stdlib yes)`: | ||
|
||
$ dune build B | ||
Logical Path / Physical path: | ||
B | ||
$TESTCASE_ROOT/_build/default/B | ||
Coq | ||
$TESTCASE_ROOT/_build/default/Coq | ||
Coq.Init | ||
$TESTCASE_ROOT/_build/default/Coq/Init | ||
Module | ||
Prelude | ||
:= Struct Inductive BootType : Set := boot : BootType | type : BootType. End | ||
|
||
Hello | ||
: Set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Definition mynat := nat. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(coq.theory | ||
(name basic) | ||
(package no-stdlib) | ||
(stdlib no) | ||
(synopsis "Test Coq library")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(lang dune 3.5) | ||
|
||
(using coq 0.6) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
From Coq Require Import Prelude. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Test that when `(stdlib no)` is provided, the standard library is not bound to `Coq` | ||
and the prelude is not imported | ||
|
||
$ dune build | ||
*** Warning: in file foo.v, library Prelude is required from root Coq and has not been found in the loadpath! | ||
File "./bar.v", line 1, characters 20-23: | ||
Error: The reference nat was not found in the current environment. | ||
|
||
File "./foo.v", line 1, characters 0-32: | ||
Error: Cannot find a physical path bound to logical path | ||
Prelude with prefix Coq. | ||
|
||
[1] |