Export lists in modules

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Thu Mar 2 18:51:22 EST 2006


Malcolm Wallace <Malcolm.Wallace at cs.york.ac.uk> writes:

> 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 at knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/


More information about the Haskell-prime mailing list