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
Better error messages for generalize easter eggs #3672
Comments
I'm compiling it now. |
open import Agda.Primitive
_∘_ : ∀ {a b c}
{A : Set a} {B : A → Set b} {C : {x : A} → B x → Set c} →
(∀ {x} (y : B x) → C y) → (g : (x : A) → B x) →
((x : A) → C (g x))
f ∘ g = λ x → f (g x)
data D {a} (A : Set a) : Set a where
d : D A → D A
data E {a} (A : Set a) : Set a where
e : A → E A
F : ∀ {a} {A : Set a} → A → D A → Set a
F x (d ys) = E (F x ys)
G : ∀ {a} {A : Set a} → D A → D A → Set a
G xs ys = ∀ x → F x xs → F x ys
postulate
H : ∀ {a} {A : Set a} {xs ys : D A} → G xs ys → Set
variable
a : Level
A : Set a
P : A → Set a
x : A
xs : D A
postulate
h : {f : G xs xs} (_ : P x) → F x xs → H (λ _ → e ∘ f _)
|
@nad I've pushed a fix to this problem to the PR branch. |
I tested the previous commit (before your force-push) and only found one problem. This problem still exists: open import Agda.Builtin.Equality
open import Agda.Builtin.List
open import Agda.Builtin.Sigma
open import Agda.Primitive
data ⊥ {ℓ} : Set ℓ where
record ⊤ {ℓ} : Set ℓ where
data _⊎_ {a b} (A : Set a) (B : Set b) : Set (a ⊔ b) where
inj₁ : A → A ⊎ B
inj₂ : B → A ⊎ B
_×_ : ∀ {a b} (A : Set a) (B : Set b) → Set (a ⊔ b)
A × B = Σ A (λ _ → B)
Any : ∀ {a p} {A : Set a} (P : A → Set p) (xs : List A) → Set p
Any P [] = ⊥
Any P (x ∷ xs) = P x ⊎ Any P xs
All : ∀ {a p} {A : Set a} → (A → Set p) → List A → Set p
All P [] = ⊤
All P (x ∷ xs) = P x × All P xs
_∈_ : ∀ {a} {A : Set a} → A → List A → Set a
x ∈ xs = Any (x ≡_) xs
index : ∀ {a p} {A : Set a} {P : A → Set p} {x : A} {xs : List A} →
All P xs → x ∈ xs → P x
index {xs = _ ∷ _} (p , _) (inj₁ refl) = p
index {xs = _ ∷ _} (_ , ps) (inj₂ q) = index ps q
tabulate : ∀ {a p} {A : Set a} {P : A → Set p} {xs : List A} →
(∀ {x} → x ∈ xs → P x) → All P xs
tabulate {xs = []} _ = _
tabulate {xs = _ ∷ _} f = f (inj₁ refl) , tabulate (λ p → f (inj₂ p))
variable
a p : Level
A : Set a
P : A → Set p
xs : List A
index∘tabulate :
{x : A} (f : ∀ {x} → x ∈ xs → P x) (×∈xs : x ∈ xs) →
index (tabulate f) ×∈xs ≡ f ×∈xs
index∘tabulate {xs = _ ∷ _} f (inj₁ refl) = refl
index∘tabulate {xs = _ ∷ _} f (inj₂ p) = index∘tabulate _ p
It should be easy to solve this constraint. |
Not that easy. With (_P.p_173 {A = A} {xs = xs}) = (_P.p_173 {A = A} {xs = x ∷ xs}) |
Ah, OK. Perhaps we should always display implicit arguments (to some depth) when two terms are claimed to be distinct, but are printed in the same way. |
{-# OPTIONS --cubical #-}
open import Agda.Builtin.Cubical.Path
open import Agda.Primitive
open import Agda.Primitive.Cubical
variable
a : Level
A : Set a
x : A
refl : x ≡ x
refl {x = x} = λ _ → x
lemma : primTransp (λ i → refl i) i0 x ≡ x
lemma = ?
|
Please keep milestone 2.6.0.1 clear of issues that concern the new features of Agda 2.6.0. |
The following short piece of code triggers an internal error: open import Agda.Builtin.Equality
open import Agda.Primitive
variable
ℓ : Level
A : Set ℓ
P : A → Set ℓ
B x y : A
postulate
subst : (P : A → Set ℓ) → x ≡ y → P x → P y
subst-const : ∀ (x≡y : x ≡ y) {b} → subst (λ _ → B) x≡y b ≡ b
The inferred type of {x.A.ℓ : Level} {x.A : Set x.A.ℓ} {x y : x.A}
{B : Set "dummyTerm: src/full/Agda/TypeChecking/Generalize.hs:602"}
{a : Level} (x≡y : x ≡ y) {b : B} →
subst (λ _ → B) x≡y b ≡ b |
Found an easter egg!
open import Agda.Builtin.Bool using (Bool; true)
open import Agda.Builtin.Sigma using (Σ; _,_)
open import Agda.Builtin.Equality using (_≡_)
Bool² : Set
Bool² = Σ Bool (λ _ → Bool)
data F : Bool² → Set where
mk : ∀ {a b} → F (a , b)
variable
x : Bool²
X : F x
postulate
f : ∀ {A B : Set} → (A → B) → Bool
fail : let _ = f (λ { _ → _ , _ }) in X ≡ mk
fail = {!!}
|
This one seems to be quite complicated (#FVTY).
module Scratch where
postulate
List : (A : Set) → Set
Interleaving : {A : Set} (xs ys zs : List A) → Set
private
variable
L : Set
xs zs : List L
module _ {L : Set} (A : (xs ys : List L) → Set) where
data SizedDag : (xs ys : List L) → Set
record ConsCell (xs zs : List L) : Set
data SizedDag where
cons : ConsCell xs zs → SizedDag xs zs
record ConsCell xs zs where
inductive
constructor consCell
field
{ys ms xs′ ys′} : List L
x : A xs′ ys′
i : Interleaving ms xs′ xs
j : Interleaving ms ys′ ys
rest : SizedDag ys zs
private
variable
x : L
ys : List L
module _ {L : Set} {A : (xs ys : List L) → Set} where
data El : SizedDag A xs ys → Set where
here : (cell : ConsCell A xs zs) → El (cons cell)
data IsNear : {d : SizedDag A xs ys} (e : El d) → Set where
here : ∀ {i : Interleaving ? ? ?} {j : Interleaving ? ? ?} {d} →
IsNear (here (consCell x i j d))
|
The following code triggers an internal error:
This error is not triggered by Agda 2.5.4.2.20190310.
The text was updated successfully, but these errors were encountered: