
1 Feb
2007
1 Feb
'07
7:44 a.m.
newtype Y = Y { unY :: X }
instance Eq Y where (==) = foo
nub' :: [X] -> [X] nub' = map unY . sort . map Y
Yes, I thought of that. I'm really thinking of how I can generalize the Eq class so I dont have to go around manually "lifting" operations that are already defined (like operations on integers for modulo-n rings) -- Diego Navarro