[Haskell-cafe] automatically deriving Map and Filter on datatypes
etc.
Janis Voigtlaender
voigt at tcs.inf.tu-dresden.de
Thu Jun 5 04:49:33 EDT 2008
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?
But for many datatypes it is quite natural. Just google for "theory of
containers".
Ciao, Janis.
--
Dr. Janis Voigtlaender
http://wwwtcs.inf.tu-dresden.de/~voigt/
mailto:voigt at tcs.inf.tu-dresden.de
More information about the Haskell-Cafe
mailing list