[Haskell-cafe] lawless instances of Functor

Jochem Berndsen jochem at functor.nl
Mon Jan 4 17:53:16 EST 2010


Steffen Schuldenzucker wrote:
> data Foo a = Foo a
> 
> instance Functor Foo where
>     fmap f (Foo x) = Foo . f . f $ x

I think this doesn't typecheck.

Cheers, Jochem

-- 
Jochem Berndsen | jochem at functor.nl | jochem@牛在田里.com


More information about the Haskell-Cafe mailing list