Giter Site home page Giter Site logo

Comments (4)

plt-amy avatar plt-amy commented on September 22, 2024

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.

nad avatar nad commented on September 22, 2024

Could one instead change instance search so that it never succeeds for opaque symbols?

from agda.

jespercockx avatar jespercockx commented on September 22, 2024

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.

jespercockx avatar jespercockx commented on September 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.