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

Neil Mitchell ndmitchell at gmail.com
Thu Jun 5 12:54:51 EDT 2008


>  PS Why isn't Functor derivable?

Derive can do it: http://www.cs.york.ac.uk/~ndm/derive

I believe that Twan (the author of Functor deriving in Derive) is
trying to get this suggested for Haskell' as a proper deriving.

As for the original question, Uniplate will certainly do map, and will
probably help with filter - as the definition of Filter is not obvious
given the type. And you can have automatic deriving with Uniplate (see
PlateData in the paper or the module structure)



More information about the Haskell-Cafe mailing list