Comments (14)
It looks like a universe problem. Generally those are kind of difficult to debug but they also rarely crop up when "simple" things are going on. I don't think that I can debug this without a more complete example. If there is a place where I can see the code, I can take a look.
from coq-ext-lib.
I am attaching self-contained example. Last line of R.v gives the error shown above.
Thanks!
from coq-ext-lib.
It looks like the issue is with the fact that the writerT is not universe polymorphic. I can fix that in ExtLib and build a new package.
from coq-ext-lib.
Thanks for looking into it and I am looking forward to the fix.
from coq-ext-lib.
This is fixed in ff0e272.
from coq-ext-lib.
Thanks! How soon do you think this fix will propagate to OPAM repository? I would rather avoid installing it manually.
from coq-ext-lib.
I will submit a pull request tonight.
from coq-ext-lib.
Pull request submitted. coq/opam#63
from coq-ext-lib.
After this patch WriterMonadNoT.v no longer compiles:
File "./WriterMonadNoT.v", line 18, characters 33-44:
Error:
In environment
s, t : Type
Monoid_s : Monoid s
x : writerT Monoid_s ident t
The term "runWriter x" has type "PPair.pprod t s"
while it is expected to have type "(?A * ?B)%type".
make: *** [WriterMonadNoT.vo] Error 1
from coq-ext-lib.
In order to (partially) break the dependence on pairs (which introduces some universe constraints), I needed to implement the writer monad using polymorphic pairs. They work essentially the same way as regular pairs except they are polymorphic and use primitive projections (and are therefore more efficient).
from coq-ext-lib.
I have changed in WriterMonadNoT in my example above 'fst' to 'pfst' and 'snd' to 'psnd' after which it compiled without the problem. However the original error still persists:
The term "Monoid_RthetaFlags" has type "Monoid.Monoid RthetaFlags"
while it is expected to have type "Monoid.Monoid ?s" (universe inconsistency).
Here is the line which triggers it:
Definition flags_m : Type -> Type := writer Monoid_RthetaFlags.
from coq-ext-lib.
Hmmm...it is working for me. Here are the two files that you sent me fixed so that they compile.
from coq-ext-lib.
Sorry, I did not realized I need now specify:
Set Universe Polymorphism.
It solved the problem. Thanks!
from coq-ext-lib.
Ah. I should have pointed that out. U had forgotten that that was the first
thing that I did.
On Tue, Apr 26, 2016, 3:17 PM Vadim Zaliva [email protected] wrote:
Sorry, I did not realized I need not specify:
Set Universe Polymorphism.
It solved the problem. Thanks!
—
You are receiving this because you modified the open/close state.Reply to this email directly or view it on GitHub
#23 (comment)
- gregory malecha
gmalecha.github.io
from coq-ext-lib.
Related Issues (20)
- The EqvWF_Build instance messes up with typeclass resolution
- Please create a tag for the upcoming release of Coq 8.13 HOT 2
- Please create a tag for the upcoming release of Coq 8.14 HOT 2
- Right Idenity in MonadLaw HOT 4
- Duplicate Monad List instances HOT 3
- `Set Typeclass Strict Resolution`
- `Monad list` instances will cause template-polymorphism problems
- Please pick the version you prefer for Coq 8.15 in Coq Platform 2022.02 HOT 3
- Please pick the version you prefer for Coq 8.16 in Coq Platform 2022.09 HOT 2
- can't install package coq-ext-lib for coq 8.12 HOT 3
- what is the most stable version for coq 8.12, 0.11.7 or dev? is dev stable? HOT 2
- Please pick the version you prefer for Coq 8.17 in Coq Platform 2023.03 HOT 2
- Please pick the version you prefer for Coq 8.18 in Coq Platform 2023.10
- Metadata problem with release 0.12.1 on opam HOT 2
- rwHyps stops on first recursive equality
- Please pick the version you prefer for Coq 8.19 in Coq Platform 2024.01 HOT 2
- build problem HOT 2
- stdlibpp
- Add the let* monadic notation HOT 3
- notation conflict HOT 24
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 coq-ext-lib.