-
Notifications
You must be signed in to change notification settings - Fork 437
Create (stdlib) syntax for Coq stanza #6164
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(coq.theory | ||
(name A) | ||
(stdlib no) | ||
(theories Coq)) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(lang dune 3.5) | ||
(using coq 0.6) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Print LoadPath. | ||
Print Prelude. | ||
Require Import mytheory. | ||
Check Hello. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(coq.theory | ||
(name B) | ||
(stdlib yes) | ||
(theories Coq)) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(lang dune 3.5) | ||
(using coq 0.6) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Unset Elimination Schemes. | ||
Inductive BootType := boot | type. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(coq.theory | ||
(name Coq) | ||
(package Coq) | ||
(boot)) | ||
|
||
(include_subdirs qualified) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(lang dune 3.3) | ||
(using coq 0.4) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
Inductive Hello := World | Bye. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(lang dune 3.3) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Testing composition of theories across a Dune workspace with a boot library and | ||
importing ``stdlib`` enabled or disabled. | ||
|
||
Composing 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 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 |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -14,5 +14,5 @@ This test is currently broken due to the workspace resolution being faulty #5899 | |||||
1 | (coq.theory | ||||||
2 | (name foo)) | ||||||
Error: 'coq.theory' is available only when coq is enabled in the dune-project | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is automatically generated output. There was a problem hiding this comment. But also technically correct since it is talking about the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah! Thanks for clarifying. Perhaps both There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since it appears in a command line error message, demarking it monospace would waste space. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @christinerose These are Cram (I/O) tests. The test system runs specified commands, and the output of the commands is compared against what is committed here. Hence, you cannot just change this output because then the tests would fail. If you would want to change the wording of the messages, you'd have to do it where the I/O is actually performed. (As an additional note, I'd say that the required standard of copy-editing in tests is a bit lower than one would expect for, say, documentation.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Understood. Please feel free to discard anything that's not useful. I was tagged to review, so I did my thing. 😄 .... Do you need me to go back and "approve" it before you can move forward? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, the PR has already been merged and completed. Thanks for your comments @christinerose. |
||||||
file. You must enable it using (using coq 0.5) in your dune-project file. | ||||||
file. You must enable it using (using coq 0.6) in your dune-project file. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Autogenerated output. |
||||||
[1] |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -16,5 +16,5 @@ that the error message is good when the coq extension is not enabled. | |||||
1 | (coq.theory | ||||||
2 | (name foo)) | ||||||
Error: 'coq.theory' is available only when coq is enabled in the dune-project | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Autogenerated output. |
||||||
file. You must enable it using (using coq 0.5) in your dune-project file. | ||||||
file. You must enable it using (using coq 0.6) in your dune-project file. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Autogenerated output. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Autogenerated from where? Like by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the command line error message of Dune. |
||||||
[1] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Definition mynat := nat. |
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")) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(lang dune 3.5) | ||
|
||
(using coq 0.6) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
From Coq Require Import Prelude. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Test that when `(stdlib no)` is provided, the standard library is not bound to `Coq` | ||
and the prelude is not imported | ||
|
||
$ dune build --display=short foo.vo | ||
coqdep foo.v.d | ||
*** Warning: in file foo.v, library Prelude is required from root Coq and has not been found in the loadpath! | ||
coqc foo.{glob,vo} (exit 1) | ||
File "./foo.v", line 1, characters 0-32: | ||
Error: Cannot find a physical path bound to logical path | ||
Prelude with prefix Coq. | ||
|
||
[1] | ||
|
||
$ dune build --display=short bar.vo | ||
coqdep bar.v.d | ||
coqc bar.{glob,vo} (exit 1) | ||
File "./bar.v", line 1, characters 20-23: | ||
Error: The reference nat was not found in the current environment. | ||
|
||
[1] |
Uh oh!
There was an error while loading. Please reload this page.