1
は、与えられた `の理解:はdecEq`
*section3> :module Data.Vect
*section3> :let e = the (Vect 0 Int) []
*section3> :let xs = the (Vect _ _) [1,2]
*section3> decEq xs e
(input):1:7:When checking argument x2 to function Decidable.Equality.decEq:
Type mismatch between
Vect 0 Int (Type of e)
and
Vect 2 Integer (Expected type)
Specifically:
Type mismatch between
0
and
2
はなぜNat
引数はDecEqお互いに等しくなければなりませんか?
注 - https://groups.google.com/forum/#!topic/idris-lang/qgtImCLka3Iに掲載さは、もともと
'VECT 0 Int'と' VECT 1 Int':
あなたは最初に均質なバージョンへの委任そして、その長さをチェックすることにより、同じ要素型の
Vect
ORS用に独自の不均一な平等のサイダーを書くことができます'Vect n Int'や' Vect n Float'のような異なる型です。 – gallais