Comments (18)
AFAIK Coq.Permutation does not exists as a library.
The Permutation file in coq theories has long name Coq.Sorting.Permutation.Permutation.
You can use any suffix of this (in particular Permutation alone), but not Coq.Permutation.
I close the bug, but feel free to reopen if you think I missed something.
from pg.
Well, the point is, if I disable PG's background compilation, the file works fine. (With Coq 8.5.)
However, I can see that my minimal example does not. Will have to investigate.
(Also, GitHub does not allow me to re-open the bug.)
from pg.
D'oh, okay, so this one is on me. I thought I could reproduce the bug with just the plain "Require Export" form, but actually I can only trigger it with the new "From ... Require Export" form:
From Coq Require Export Permutation.
It seems that while by PR #50 started support for that, it's not yet complete.
from pg.
I see. the PR #50 has not yet been merged, but will soon be.
from pg.
I suppose the problem is that with From A Require B
, Coq actually imports A....B
, filling in an arbitrary path. I am not sure how PG should best handle this.
from pg.
For what it's worth, I handle this by, essentially, asking Coq to compile From A Require B
, and inspecting the glob file (which is created even if the file compilation fails, thankfully) to see what absolute name it inferred. Another option is to issue Locate Module B
and filter for the ones starting with A
.
from pg.
Reopening this; the real issue is that From A Import B doesn't mean Import A.B, but "Import something of the name A.??.B". (Is that correct). This seems to be a blocker for merging #50, so it's good to keep it open as something to remember while working on that.
from pg.
Jason, does that work even if B isn't compiled yet? The context in which this popped up was PG's on-the-fly compilation.
from pg.
Oh. How about running coqdep
with the relevant arguments on a new file with only the From ... Require ...
command?
from pg.
Or, better, why not just run coqdep
? Is it because you don't have COQBIN
or something?
from pg.
I'm not sure; I didn't write the compilation code :) @hendriktews did, IIRC. Hendrik, opinions?
from pg.
I think I remember that running coqdep (or make) was an option in Hendrik's code. @hendriktews maybe this is time to remove the part of the code that mimicks coqdep and rely only on coqdep?
from pg.
I read the code and it seems that by default coqdep is iused to compute dependencies. This PR should therefore be mostly correct. I will try to test soon.
from pg.
I have not changed my configuration, and I am seeing these failures for every file with From Coq Require Import ...
. So this does not seem to help.
I believe it is using coqdep only to extract the transitive dependencies of whatever is being imported; it still uses the hand-rolled regexp's to find the initial thing to import.
from pg.
I found two problems
1- The code uses coqdep, but it needs to give an argument to coqdep: the name of a file. This part of the code is wrong in presence of From. We need to search recursively inside directories to find where a file is located, then calling coqdep on it should be ok.
2- It seems that coqdep is sometimes called with -Q . "" with coq-8.5, which is wrong and supposedly fixed already.
P.
from pg.
We need to search recursively inside directories to find where a file is located, then calling coqdep on it should be ok.
Well, but then we have to figure out that directory first. It may well be somewhere inside the Coq stdlib.
Can't we generate a new file containing only the From ... Require ...
line, and run coqdep on that?
from pg.
OK I think I spotted the source of the problem.
Currently what your patch does is from
From foo Require bar.
compute a module name foo.bar
Which is wrong. the actual module name is probably something foo.foo1.foo2.bar.
The code of Hendrik works by generating a smal file with only Require foo.bar and calls coqdep to see where coq find the file.
The solution is to not concat the prefix foo to bar, but instead build a temporary file with the complete From ... Require ... command.
I will try to fix this.
P.
from pg.
Should be fixed now. thanks for reporting (and for the PR).
from pg.
Related Issues (20)
- Update https://proofgeneral.github.io/ HOT 2
- `coq-accept-proof-using-suggestion 'always` incorrectly believes that `proof` is a proof directive HOT 4
- Hitting 'tab' to indent just throws an error HOT 6
- Broken link in Ch. 11 of User's Manual
- ProofGeneral does not handle "Proof term." directives HOT 11
- Feature request: sparate commands for jumping to current point with/without omitting proofs HOT 7
- *response* buffer only showing last output HOT 3
- Tons of warnings when using certain PG features HOT 11
- "Omit proof" on a Let in a section leads to warning HOT 14
- "Omit proofs" breaks other proofs because it also skips hints HOT 14
- whitelist for admissible commands inside proofs HOT 17
- PG incorrectly interprets `}.` as a single token, which results in incorrectly accepting files that coqc rejects
- test_wholefile.v incompatible with 8.17 HOT 1
- Scheme ... with is indented improperly HOT 1
- Merging the Abella fork of PG HOT 9
- Automatic indenting for Easycrypt HOT 1
- generic/pg-goals.el shouldn't be executable HOT 1
- confusing error on incorrect _CoqProject file
- Colors don't work in emacs-nox HOT 1
- Compile-before-require setting does not presist HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pg.