Comments (4)
I think I ran into this same on Sunday, but I wrote it off since I was trying to do something stupid anyway.
The immediate solution that pops into my head is to fix up the instance canditates according to the following rule: if we have i : {∆} → f xs
and f
is an opaque symbol that's unfolded in the current block, then it's replaced with i : {∆} → reduce (f xs)
. But it's possible that this might reduce the instance head too far, and so it would be necessary to consider an exponential number of i' : {∆} → reduce (f xs)
in which different subsets of the unfolding set are allowed to reduce, which wouldn't be viable.
from agda.
Could one instead change instance search so that it never succeeds for opaque symbols?
from agda.
Well one could but that solves the problem by denying it exists. A better way might be to ignore all opaque
flags in the construction of the instance table, and then filter our the instances that are not legal because of opaque
statements as part of the regular instance filtering.
from agda.
The same bug also happens for abstract
:
it : {X : Set} → {{X}} → X
it {{x}} = x
postulate
A : Set
a : A
abstract
B : Set
B = A
instance
b : B
b = a
works : B
works = it
abstract
fails : B
fails = it
from agda.
Related Issues (20)
- Trigger failure of `checkModalityArgs` HOT 4
- Reproduce errors in createMissingHCompClause HOT 2
- `cabal install Agda` fails -- missing files in multiple pacakges HOT 2
- Erasure and irrelevance forbid deeper absurd patterns HOT 5
- Range printed twice for "Parse error" HOT 1
- Code only reachable from display forms not serialised in Agda 2.7.0 HOT 21
- Parse errors are communicated as `Exception` duplicating their range.
- Some warnings aren't yet covered by our testsuite
- Unexpected hidden argument in nested records/modules HOT 6
- Regression: emptiness check fails when erased constructors are involved HOT 8
- `--exact-split` is not default in 2.7.0, contrary to claims
- Instance missing when abstracting over an incomplete type HOT 3
- Instances found by instance search are inlined HOT 2
- Performance regression caused by making `--save-metas` the default HOT 9
- Both stack and cabal fail to install Agda HOT 5
- Deprecate idiom brackets? HOT 4
- Verbosity options are not picked up from the main module when this module is deserialized unchanged
- Compiled `--erased-cubical` program produces non-deterministic value HOT 3
- Extend the emptiness check to all pattern records? HOT 7
- [bug?] `WARNING_ON_USAGE` in parameterised module/record fails to fire after module instantiation 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 agda.