[Haskell-cafe] Functor instance derived from Monad

Frantisek Farka frantisek at farka.eu
Wed Feb 19 22:25:30 UTC 2014


Hi cafe,

when reading the Functor-Applicative-Monad proposal [1] on Haskell
wiki I remembered that I have seen instance similar to

    instance (Monad m) => Functor m where 
        fmap f a = a >>= \x -> return $ f x

with FlexibleInstances and UndecidableInstances language extensions.
But I cannot remember where it was nor can I find any useful reference.
Is there some library in Hackage with this and similar instances?

Can you point out some leading marks to me?


Thanks

FF


[1]
http://www.haskell.org/haskellwiki/Functor-Applicative-Monad_Proposal


More information about the Haskell-Cafe mailing list