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 with --confluence-check #5848

Closed
xekoukou opened this issue Mar 24, 2022 · 4 comments
Closed

Internal error with --confluence-check #5848

xekoukou opened this issue Mar 24, 2022 · 4 comments
Assignees
Labels
confluence Concerning confluence of rewriting. internal-error Concerning internal errors of Agda rewriting Rewrite rules, rewrite rule matching type: bug Issues and pull requests about actual bugs
Milestone

Comments

@xekoukou
Copy link

An internal error has occurred. Please report this as a bug.

Location of the error: __IMPOSSIBLE__, called at src/full/Agda/TypeChecking/Rewriting/NonLinPattern.hs:320:28 in Agda-2.6.3-JzcsF0w6Ok8pSpuaNaFFz:Agda.TypeChecking.Rewriting.NonLinPattern

{-# OPTIONS  --confluence-check --cubical #-}

open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.HITs.SetQuotients as Sq

module Test (ℓ : Level) where

private
  variable
    A B : Type ℓ
    T : A  A  Type ℓ


E : (T : A  A  Type ℓ)  (B  A)  (B  A)  Type ℓ
E T f1 f2 =  x  T (f1 x) (f2 x)

dd : (B  A) / (E T)  B  A / T
dd {T = T} f = Sq.rec (isSetΠ λ _  squash/) (λ g x  [ g x ]) l1 f where
  l1 : (a b : _  _)  E T a b  (λ x  [ a x ]) ≡ (λ x  [ b x ])
  l1 a b r i = ?
@xekoukou xekoukou changed the title "Impossible" bug due to "confluence-check". Internal Error due to "confluence-check". Mar 24, 2022
@andreasabel
Copy link
Member

The internal error is raised here:

instance GetMatchables Term where
getMatchables = getDefs' __IMPOSSIBLE__ singleton

@andreasabel andreasabel added rewriting Rewrite rules, rewrite rule matching confluence Concerning confluence of rewriting. internal-error Concerning internal errors of Agda labels Mar 24, 2022
@andreasabel andreasabel added this to the 2.6.3 milestone Mar 24, 2022
@andreasabel
Copy link
Member

Would be interesting to see whether this is a regression. @xekoukou , could you shrink your test case so that it does not use the cubical library, only the Agda.Builtin.* modules?

@xekoukou
Copy link
Author

{-# OPTIONS  --confluence-check --cubical #-}

open import Agda.Builtin.Cubical.Path

module Test where

l1 : PathP ? ? ?
l1 i = ?

@andreasabel andreasabel added the type: bug Issues and pull requests about actual bugs label Mar 24, 2022
@andreasabel
Copy link
Member

Thanks @xekoukou !
For this minimal test, 2.6.3 and 2.6.2 have the same location of the internal error. 2.6.1 has a different one, and 2.6.0 does not know about --confluence-check. So, it is not a regression.

@andreasabel andreasabel changed the title Internal Error due to "confluence-check". Internal error with --confluence-check Mar 25, 2022
@jespercockx jespercockx self-assigned this Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confluence Concerning confluence of rewriting. internal-error Concerning internal errors of Agda rewriting Rewrite rules, rewrite rule matching type: bug Issues and pull requests about actual bugs
Projects
None yet
Development

No branches or pull requests

3 participants