
I have the two notes on the GHC library. The docs show that 1. Map has the function for the Map inclusion relation, and Set does not have such for sets. 2. notMember looks unnecessary, because one can write not . Map.member k. Regards, ----------------- Serge Mechveliani mechvel@botik.ru

Am 14.10.2010 15:44, schrieb Serge D. Mechveliani:
I have the two notes on the GHC library. The docs show that 1. Map has the function for the Map inclusion relation, and Set does not have such for sets.
Which function(s) do you mean? Data.Map: isSubmapOf :: (Ord k, Eq a) => Map k a -> Map k a -> Bool isSubmapOfBy :: Ord k => (a -> b -> Bool) -> Map k a -> Map k b -> Bool isProperSubmapOf :: (Ord k, Eq a) => Map k a -> Map k a -> Bool isProperSubmapOfBy :: Ord k => (a -> b -> Bool) -> Map k a -> Map k b -> Bool Data.Set: isSubsetOf :: Ord a => Set a -> Set a -> Bool isProperSubsetOf :: Ord a => Set a -> Set a -> Bool
2. notMember looks unnecessary, because one can write not . Map.member k.
That's the same for elem and notElem. Cheers Christian
Regards, ----------------- Serge Mechveliani mechvel@botik.ru

Am 14.10.2010 17:27, schrieb Christian Maeder:
2. notMember looks unnecessary, because one can write not . Map.member k.
That's the same for elem and notElem.
One motivation was to ease LaTeX creation by replacing `notElem` with \notin.
Cheers Christian
Regards, ----------------- Serge Mechveliani mechvel@botik.ru

On Thu, Oct 14, 2010 at 05:27:52PM +0200, Christian Maeder wrote:
Am 14.10.2010 15:44, schrieb Serge D. Mechveliani:
I have the two notes on the GHC library. The docs show that 1. Map has the function for the Map inclusion relation, and Set does not have such for sets.
Which function(s) do you mean?
Data.Map: isSubmapOf :: (Ord k, Eq a) => Map k a -> Map k a -> Bool [..] isSubsetOf :: Ord a => Set a -> Set a -> Bool isProperSubsetOf :: Ord a => Set a -> Set a -> Bool
I am sorry for missing this. Now I see that GHC is all right at this point. ----------------- Serge Mechveliani mechvel@botik.ru
participants (2)
-
Christian Maeder
-
Serge D. Mechveliani