def two: Nat = suc (suc zero)
data Id : {A : U} (x y : A) -> U where
| refl : {A : U} (x : A) -> Id x x
data Exists: {A: U} {P: A -> U} -> U where
| intro: {A: U} {P: A -> U} (witness: A) (proof: P witness) -> Exists {A} {P}
def test: Exists {Nat} {Id two} = intro two (refl two)
shows
|
10 | def exitstest: Exists {Nat} {Id two} = intro two (refl two)
| ^
Cannot unify expected type
?22 two
with inferred type
Id {Nat} two two
*** Exception: ExitSuccess
This should be ok if we check intro ... against the type Exist. But we didn't, the checking fallen to the last clause which is infer then judge equality.
shows
This should be ok if we check
intro ...against the typeExist. But we didn't, the checking fallen to the last clause which is infer then judge equality.