Sometimes Agda gives me nonsense "Not in scope" errors, leaving me not knowing what to do. Here is an example:
open import Data.Product
open import Data.Bool
open import Data.Unit
postulate
μ : (Set → Set) → Set
In : {F : Set → Set} → F (μ F) → μ F
unIn : {F : Set → Set} → μ F → F (μ F)
NatT : Set
NatT = μ λ x -> Σ Bool (λ { true -> ⊤; false -> x })
x : NatT
x = In (false , In (true, tt))
This one complains true is not in scope. This is even weirder considering x = In (true, tt) works fine. Why this happens?
Not in scope:
true, at /Users/v/agda/mu.agda:14,21-26
(did you mean
'Bool.true' or
'Data.Bool.Bool.true' or
'Data.Bool.true' or
'true'?)
when scope checking true,