instance Eq Tree Test, .
instance Eq Test where
(Test a) == (Test b) = a == b
-, Test Eq Test . , data Test a = ..., , . :
instance Eq (Test a) where
(Test y) == (Test x) = x == y
, Eq Test a. a b x y. , " " " " , .
: x == y. guantee, a Eq. , :
instance Eq a => Eq (Test a) where
(Test y) == (Test x) = x == y
, Test a Eq, a Eq.
Tree instance Eq :
instance (Eq a, Eq (Forest a)) => Eq (Tree a) where
(Tree x1 y1) == (Tree x2 y2) = x1 == x2 && y1 == y2
(, , , , () -, ).
, - @luqui - if type Forest a = [Tree a], Eq (Forest a), instance Eq a => Eq [a] . , :
instance Eq a => Eq (Tree a) where
(Tree x1 y1) == (Tree x2 y2) = x1 == x2 && y1 == y2