Proposal: Add gtraverse to Data.Data

José Pedro Magalhães jpm at cs.uu.nl
Sun Aug 18 17:38:16 CEST 2013


+1

Pedro


On Fri, Aug 16, 2013 at 1:21 AM, Edward Kmett <ekmett at gmail.com> wrote:

> Data.Data provides an gmapM as an analogue to mapM but not one to traverse.
>
>
> The following definition from lens fills in this gap, but it probably belongs in Data.Data alongside its kin.
>
>
> gtraverse :: (Applicative f, Data a) => (forall d. Data d => d -> f d) -> a -> f a
>
> gtraverse f = gfoldl (\x y -> x <*> f y) pure
>
>
> Discussion period: 2 weeks
>
> -Edward Kmett
>
>
> _______________________________________________
> 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/20130818/21bc6ebe/attachment.htm>


More information about the Libraries mailing list