
2 Mar
2006
2 Mar
'06
6:51 p.m.
Malcolm Wallace
But if contexts-on-datatypes worked correctly,
data Set a = Ord a => ....
then even the "real" map from Data.Set:
map :: (Ord a, Ord b) => (a -> b) -> Set a -> Set b
could be an instance method of Functor.
fmap ($0) . fmap const :: Functor f => f a -> f a When applied to Set Int, how would it represent the intermediate set of functions? Or if it was disallowed, on what basis? -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/