
23 Jun
2015
23 Jun
'15
8:14 p.m.
alter its Eq => definition
module MatchTuple (MyP) where data MyP t = MyP(t,t) deriving Show instance Eq t => Eq (MyP t) where (==) = match match::Eq t => MyP t-> MyP t -> Bool match (MyP(x1,x2)) (MyP(x3,x4)) | x1 == x3 && x2 == x4 = True | x1 == x4 && x2 == x3 = True | otherwise = False ?