Add everywhereM' to Data.Generics.Schemes

José Pedro Magalhães jpm at cs.uu.nl
Mon Apr 12 15:35:25 EDT 2010


Hi Maciej,

Data.Generics.Schemes is now on the syb package, and I'm its maintainer. But
I'm not so sure it is wise to start adding more traversal schemes of this
form, since there might be many of them: if we include everywhereM', we
certainly have to include the bottom-up everywhereM too. Then there are the
possible Applicative variants, etc...

In general, since these traversal functions are small and everywhere and
everywhere' already show the pattern of how to write them, maybe it's best
that they are defined by the user, unless there is some general consensus
that they would be widely useful.


Cheers,
Pedro

On Mon, Apr 12, 2010 at 20:56, Maciej Podgurski <
maciej.podgurski at googlemail.com> wrote:

> Hello,
>
> as an analogue to everywhere', I suggest adding everywhereM' to
> Data.Generics.Schemes. The implementation would be
>
>   everywhereM' :: Monad m => GenericM m -> GenericM m
>   everywhereM' f x = do { x' <- f x;
>                           gmapM (everywhereM' f) x' }
>
>
> Best wishes,
>
> Maciej
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/libraries/attachments/20100412/f27a2861/attachment.html


More information about the Libraries mailing list