[Haskell-cafe] automatically deriving Map and Filter on datatypes etc.

Jonathan Cast jonathanccast at fastmail.fm
Thu Jun 5 10:40:53 EDT 2008

On 5 Jun 2008, at 1:39 AM, Thomas Davie wrote:

> Even deriving an instance of Functor seems rather implausable, what  
> should it do for
> data Wierd a b = Nil | A a (Wierd a b) | B b (Wierd a b)
> Should fmap's function argument operate on 'a's, 'b's, or both?

class Functor (f :: * -> *) where ...

so, 'b's.


PS Why isn't Functor derivable?

More information about the Haskell-Cafe mailing list