In the agda docs, I read that when "some meta-variable other than the goals cannot be solved the code will be highlighted in yellow"
I'm trying to understand this in a somewhat degenerate case.
If I define a regular product type then a stupid program works fine.
data _==_ {l}{X : Set l}(x : X) : X -> Set where
refl : x == x
data prod (A B : Set) : Set where
_,,_ : A → B → prod A B
fst' : {A B : Set} → prod A B → A
fst' (x ,, x₁) = x
stupid : fst' (3 ,, 3) == 3
stupid = refl
However, if I use a product as a special case of a dependent product, I get the yellow highlighting for stupid''''
. Specifically, the fst
and and the second 3
are highlighed yellow. Why do all the other stupid*
's work except for stupid''''
? Are there any general tips for debugging yellow highlighting errors in agda?
record Sg {l}(S : Set l)(T : S -> Set l) : Set l where
constructor _,_
field
fst : S
snd : T fst
open Sg public
_*_ : forall {l} -> Set l -> Set l -> Set l
S * T = Sg S \ _ -> T
infixr 40 _,_
infixr 20 _*_
threethree : Nat * Nat
threethree = 3 , 3
three : Nat
three = fst threethree
stupid'' : three == 3
stupid'' = refl
stupid''' : fst (threethree) == 3
stupid''' = refl
--here's the yellow highlighting
stupid'''' : fst (3 , 3) == 3
stupid'''' = refl