def __eq_test__(self, other, data): return self.match( Left=lambda x: other.match( Left=lambda y: eq_test(x, y, data=data), Right=lambda _: False, ), Right=lambda x: other.match( Left=lambda _: False, Right=lambda y: eq_test(x, y, data=data), ), )
def __eq_test__(self, other, data=None): return self.match( Nil=lambda: other.match( Nil=lambda: True, Cons=lambda _, __: False, ), Cons=lambda x, lxs: other.match( Nil=lambda: False, Cons=lambda y, lys: ( eq_test(x, y, data) and eq_test(lxs(), lys(), data) ), ), )
def __eq_test__(self, other, data): return self.match( Nothing=lambda: other.match( Nothing=lambda: True, Just=lambda _: False, ), Just=lambda x: other.match( Nothing=lambda: False, Just=lambda y: eq_test(x, y, data), ), )
def __eq_test__(self, other, data=None): return (self.__dict.keys() == other.__dict.keys() and all( testing.eq_test(self.__dict[key], other.__dict[key], data) for key in self.__dict.keys()))
def __eq_test__(self, other, data=None): return (False if len(self.__xs) != len(other.__xs) else all( eq_test(x, y, data) for (x, y) in zip(self.__xs, other.__xs)))
def __eq_test__(self, other, data, input_strategy=st.integers()): x = data.draw(input_strategy) return eq_test(self.app_endo(x), other.app_endo(x), data)
def __eq_test__(self, other, data): return eq_test(self.decomposed, other.decomposed, data)
def __eq_test__(self, other, data): return eq_test(self.x, other.x, data)