You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Panic: Pattern match failure with Setω and --without-K #6005
cubicalCubical Agda paraphernalia: Paths, Glue, partial elements, hcomp, transpinternal-errorConcerning internal errors of Agdaregression on masterUnreleased regression in development version (Change to "regression in ..." should it be released!)set-omegaProblems with infinite sorts (Setω/SSetω)type: bugIssues and pull requests about actual bugs
There seem to be a regression in the current master of Agda.
The following code (where we define the equality type at Setω)
{-# OPTIONS --without-K #-}open importAgda.Builtin.Equalityopen importAgda.Primitiveusing (Setω)
data_≡ω_ {A : Setω} (x : A) : A → Setω whererefl : x ≡ω x
congω : {A :Set} {B : Setω} (f : A → B)
→∀ {x y} → x ≡ y → f x ≡ω f y
congω f refl = refl
fails with the following message:
cong.agda:11,1-20
Panic: Pattern match failure in do expression at
src/full/Agda/TypeChecking/Primitive/Cubical.hs:2310:7-21
when checking the definition of congω
Can confirm this typechecks fine with the latest release (2.6.2.2) and with --with-K.
As expected, the code fails because toLType does not handle things that live in Setω, just as for Prop (See #5816 and the fix #5897). I tried checking the example with the fix from #5897 and it no longer fails, so we can consider this issue to also be fixed by #5897.
Current error (after #5730 has been improved) is more benign:
Cannot generate inferred clause for congω. Case to handle:
congω f
(Agda.Primitive.Cubical.primHComp {.Agda.Primitive.lzero}
{.(_ ≡ _)}
{φ = φ}
u
a)
Cannot compose with type family: f x ≡ω f y.
when checking the definition of congω
Closes #5816 and closes #6005: since cubical stuff is not generated when
just --without-K is specified, the examples there no longer panic. (They
don't panic with --cubical anymore either, but that's slightly beside
the point)
When compiling with Agda 2.8.0 the code
open import Agda.Builtin.Equality
open import Agda.Primitive using (Setω)
data _≡ω_ {A : Setω} (x : A) : A → Setω where
refl : x ≡ω x
congω : {A : Set} {B : Setω} (f : A → B)
→ ∀ {x y} → x ≡ y → f x ≡ω f y
congω f refl = refl
gives the following error
error: [CannotGenerateHCompClause]
Cannot generate hcomp clause at type @7 @6 ≡ω @7 @5
when checking the definition of congω
when compiled with --cubical or --cubical-compatible. You mention that the previous commit fixing panics with --cubical was beside the point, so I'm not sure if this is actually a regression or if this is to be expected
cubicalCubical Agda paraphernalia: Paths, Glue, partial elements, hcomp, transpinternal-errorConcerning internal errors of Agdaregression on masterUnreleased regression in development version (Change to "regression in ..." should it be released!)set-omegaProblems with infinite sorts (Setω/SSetω)type: bugIssues and pull requests about actual bugs
Activity
flupe commentedon Aug 3, 2022
Just noticed the code fails at the same place as #6001. I also logged the types passed to
toLType, giving:As expected, the code fails because
toLTypedoes not handle things that live inSetω, just as forProp(See #5816 and the fix #5897). I tried checking the example with the fix from #5897 and it no longer fails, so we can consider this issue to also be fixed by #5897.andreasabel commentedon Aug 29, 2022
Current error (after #5730 has been improved) is more benign:
plt-amy commentedon Aug 31, 2022
Part of #6049, still an internal error to be fixed
stschaef commentedon Nov 28, 2025
@plt-amy
The message of
2b4be2creadsWhen compiling with Agda
2.8.0the codegives the following error
when compiled with
--cubicalor--cubical-compatible. You mention that the previous commit fixing panics with--cubicalwas beside the point, so I'm not sure if this is actually a regression or if this is to be expected