Why does inferFunRange fail in the code below? I expected Agda to report "inferFunRange succeeded (x : A) → F x → Set".
open import Prelude
open import Tactic.Reflection
macro
test-inferFunRange : Tactic
test-inferFunRange hole = do
goal ← inferFunRange hole -|
typeError ( strErr "inferFunRange succeeded" ∷ termErr goal ∷ [] )
bar : Nat
bar = 0
record R (A : Set) : Set₁ where
field
F : A → Set
foo : (x : A) → F x → Set
foo = case bar of (λ _ → test-inferFunRange {!!})
{- Error:
A → Set !=< Set of type Set₁
when checking that the expression F has type Set
-}
Why does
inferFunRange
fail in the code below? I expected Agda to report "inferFunRange succeeded (x : A) → F x → Set".