[Haskell] The FunctorM library

Thomas Hallgren hallgren at cse.ogi.edu
Fri Mar 25 03:38:14 EST 2005


Simon Peyton-Jones wrote:

>| >
>| >     class Functor f where fmap :: ...
>| >     class Functor m => Monad m where
>| >        ...the usual stuff...
>| >        fmap = liftM
>| >
>
>It seems overkill to have a whole new language feature to deal with one
>library issue. 
>
Perhaps it is...

>For example, what if Functor T *is* defined explicitly, but in a later module?
>  
>
I guess it would be the same as what happens now if you accidentally 
declare the same instance in different modules, i.e., the system would 
complain about overlapping instances.

-- 
Thomas H



More information about the Haskell mailing list