Следующие проверки типов определения Idris с помощью Idris 1.3.0:
foo : (xs : List Nat) -> xs = ([] <+> xs)
foo xs = Refl
однако это не так:
foo : (xs : List Nat) -> xs = (neutral <+> xs)
foo xs = Refl
дает следующую ошибку типа:
When checking right hand side of foo with expected type
xs = neutral <+> xs
Type mismatch between
neutral ++ xs = neutral ++ xs (Type of Refl)
and
xs = neutral ++ xs (Expected type)
Specifically:
Type mismatch between
neutral ++ xs
and
xs
Почему neutral <+> xs
здесь не нормализуется до xs
?