On Thu, Jun 05, 2008 at 10:39:16AM +0200, 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?

Generic Haskell can do all that. Read Ralf Hinze's "Generic Programs and
Proofs" for the theory:

http://www.informatik.uni-bonn.de/~ralf/publications/habilitation.pdf

Edsko
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to