
15 Sep
2005
15 Sep
'05
6:46 a.m.
Dear GHC developers, How do you think, maybe, Data.Set also needs to provide `lookup' ? For example, I have data D = D Int String, with the instances Eq and Ord defined by the first coordinate. I do use Map Int String, and for a certain reason, also use Set D. Then, for example, the function check :: D -> Set D -> Bool check (D i name) s = case Set.lookup (D i name) s of Just (D _ nm) -> name == nm _ -> False looks natural, apart that there is no Set.lookup. ----------------- Serge Mechveliani mechvel@botik.ru