Is it possible to define fmap in terms of a Data typeclass from a Data.Data ?
It seems that with gfoldl it was not possible to change types. Are there other combinators that can do this?
I suppose this cannot be done in the general case, since no one can influence only Right 's on Either aa , but maybe it can be done for some cases like Maybe ?
(I know fmap easy to output, but I'm still wondering if this is possible with Data )
source share