Traversible Functor Data,
or: X marks the spot (Re: Haddock version during build)
Ian Lynagh
igloo at earth.li
Sun Jun 29 12:41:47 EDT 2008
On Tue, Jun 24, 2008 at 05:10:32PM +0100, Simon Peyton-Jones wrote:
> | I was surprised to see Data instances for (a->b) and IO a,
> | since for such non-algebraic types, there isn't anything to
> | gfoldl or gmap over. And those instances do indeed seem
> | to offer very little functionality (not to mention the runtime
> | errors..).
>
> I'm surprised too. I thought Data meant, well, data.
>
> Does anyone out there *want* functions and IO in Data?
I have a feeling you sometimes need those instances to make the
typechecker happy, even though you aren't actually doing anything
generic on those parts of the types.
syb-with-class has also defined IO and (->) instances, but no comment as
to why.
Thanks
Ian
More information about the Cvs-libraries
mailing list