[Haskell-cafe] instance Monad m => Functor m
Jules Bean
jules at jellybean.co.uk
Wed Apr 9 05:26:11 EDT 2008
Hans Aberg wrote:
> Using 'hugs -98', I noticed it accepts:
> instance Monad m => Functor m where
> fmap f x = x >>= return.f
>
> Has this been considered (say) as a part of the upcoming Haskell Prime?
This forbids any Functors which are not monads. Unless you allow
overlapping instances (which of course would not be h98 any more!).
Other solutions, such as class Functor m => Monad m are frequently
discussed.
I see no H' ticket for it, though.
Jules
More information about the Haskell-Cafe
mailing list