Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal error triggered by missing check for irrelevant meta dependencies #4134

Closed
jespercockx opened this issue Oct 14, 2019 · 0 comments
Closed
Assignees
Labels
irrelevance Issues to do with irrelevance annotations meta Metavariables, insertion of implicit arguments, etc occurs check Problems with checking that metavariable solutions aren't loopy type: bug Issues and pull requests about actual bugs
Milestone

Comments

@jespercockx
Copy link
Member

(discovered while working on a solution for #2170)

open import Agda.Builtin.Bool
open import Agda.Builtin.Equality

postulate
  A : Set
  f : .(Bool  A)  Bool  A

mutual
  X : .A  Bool  A
  X = _

  test : (x : Bool  A)  X (x true) ≡ f x
  test x = refl
An internal error has occurred. Please report this as a bug.
Location of the error: src/full/Agda/TypeChecking/MetaVars.hs:946

Analysis of the problem:

  • conversion checker tries to solve X (x true) == f x
  • occurs check doesn't complain about the dependency of the solution x since it occurs unguardedly on the LHS
  • however, inverseSubst cannot find a way to bind x in the solution of X, falling back to putting __IMPOSSIBLE__
  • the final solution of X is \ _ -> f __IMPOSSIBLE__, which goes boom

Possible solutions: either we make the criterion for using irrelevant variables in the occurs check more strict, or we do a separate check that inverseSubst actually did bind all the variables that are used in the solution. @andreasabel ?

@jespercockx jespercockx added type: bug Issues and pull requests about actual bugs meta Metavariables, insertion of implicit arguments, etc irrelevance Issues to do with irrelevance annotations occurs check Problems with checking that metavariable solutions aren't loopy labels Oct 14, 2019
@jespercockx jespercockx added this to the 2.6.1 milestone Oct 14, 2019
@jespercockx jespercockx self-assigned this Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
irrelevance Issues to do with irrelevance annotations meta Metavariables, insertion of implicit arguments, etc occurs check Problems with checking that metavariable solutions aren't loopy type: bug Issues and pull requests about actual bugs
Projects
None yet
Development

No branches or pull requests

1 participant