Comments (2)
Proposed fix:
diff --git a/hb.elpi b/hb.elpi
index 9bb314b..3daff91 100644
--- a/hb.elpi
+++ b/hb.elpi
@@ -595,15 +595,17 @@ get-canonical-mixins-of T S MSL :- std.do! [
structure-nparams S NParams,
coq.mk-n-holes NParams Holes,
coq.mk-app Sort {std.append Holes [ST]} SortHolesST,
- std.assert-ok! (coq.unify-eq T SortHolesST) "HB: get-canonical-mixins-of: T = sort ST",
- % Hum, this unification problem is not super trivial. TODO replace by something simpler
- get-constructor S KS,
- coq.mk-app (global KS) {std.append Holes [T, C]} KSHolesC,
- std.assert-ok! (coq.unify-eq ST KSHolesC) "HB: get-canonical-mixins-of: ST = _ _ C",
- C = app Stuff,
- std.drop {calc (NParams + 2)} Stuff MIL,
- std.map MIL (mixin-srcs T) MSLL,
- std.flatten MSLL MSL
+ if (coq.unify-eq T SortHolesST ok) (
+ % Hum, this unification problem is not super trivial. TODO replace by something simpler
+ get-constructor S KS,
+ coq.mk-app (global KS) {std.append Holes [T, C]} KSHolesC,
+ std.assert-ok! (coq.unify-eq ST KSHolesC) "HB: get-canonical-mixins-of: ST = _ _ C",
+ C = app Stuff,
+ std.drop {calc (NParams + 2)} Stuff MIL,
+ std.map MIL (mixin-srcs T) MSLL,
+ std.flatten MSLL MSL
+ )
+ (MSL = [])
].
pred under-canonical-mixins-of.do! i:term, i:list prop.
from hierarchy-builder.
The old code just filers looking at the head constant, but this is not sufficient to rule out spurious instances.
Here we tolerate that the sort ? = T
unif problem fails, which is the more expensive but correct test IMO.
from hierarchy-builder.
Related Issues (20)
- `isFinite.Build` with an explicit list creates a warning about a canonical projection to cons
- Deleting the coq-master brnach HOT 1
- `HB.instance failed without giving a specific error message` when instantiating an unexported mixin HOT 1
- Please pick the version you prefer for Coq 8.18 in Coq Platform 2023.10 HOT 2
- hnf is broken in master HOT 1
- broken in vscoq2
- Please fix test for Coq 8.20 HOT 3
- Spurious warning `Projection value has no head constant` HOT 1
- C.axioms_ appears when printing HOT 1
- HB should give an error on non existent key.
- Importing Order.TTheory in the middle break the code
- Very slow creation of a subtype instance.
- Add simpl never when defining operations
- coq.hb silently dropped
- issues affecting order.v HOT 1
- HB.saturate fails on `Type`
- Please pick the version you prefer for Coq 8.19 in Coq Platform 2024.01 HOT 2
- Error when the subject is not explicit
- Blacklist internal HB stuff for Search
- Binder issue in `HB.instance` HOT 2
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 hierarchy-builder.