
21 Nov
2005
21 Nov
'05
4:28 p.m.
Hello, I just noticed that the type of Data.Set.map is (Ord a, Ord b) => (a -> b) -> Set a -> Set b Is the 'Ord a' constraint really neccessary? It did not use to be there in the old implementation. -Iavor

21 Nov
21 Nov
4:49 p.m.
On Mon, Nov 21, 2005 at 01:28:40PM -0800, Iavor Diatchki wrote:
Hello, I just noticed that the type of Data.Set.map is (Ord a, Ord b) => (a -> b) -> Set a -> Set b Is the 'Ord a' constraint really neccessary?
I guess not, because you can define: map' :: (Ord b) => (a -> b) -> Set a -> Set b map' f = fromList . map f . toList Did the more restrictive type bite you in practice? Best regards Tomasz
7120
Age (days ago)
7120
Last active (days ago)
1 comments
2 participants
participants (2)
-
Iavor Diatchki
-
Tomasz Zielonka