[Haskell-cafe] Pulling an applicative/apply out of a record

Tyson Whitehead twhitehead at gmail.com
Mon Feb 8 05:35:12 UTC 2016


On Sunday, 7 February 2016 05:17:55 UTC-5, Tom Ellis wrote:
>
> On Sun, Feb 07, 2016 at 02:25:41AM -0500, Tyson Whitehead wrote: 
> > RecordF (f Type1) (f Type2) ... -> (f Type1, f Type2, ....) 
> > -> f (Type1, Type2, ...) -> f (Record Type1 Type2 ...) 
> > 
> > I can't seem to find any uncurried zip implementations for arbitrarily 
> > large tuples (or any other way to do this without writing the 
> > boilerplate).  Am I missing something?  Is there a better way to do 
> this? 
>
> I would call this a multi-typed 'Data.Traversable.sequence'. 
>
> Data.Profunctor.Product.TH generates this (in fact something slightly 
> more 
> general that works for ProductProfunctors, not just Applicatives). 
>

Thanks for the pointer Tom.  Currently reading up about it.  Found your 
post too.

http://h2.jaguarpaw.co.uk/posts/product-profunctor-folds/

Cheers!  -Tyson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160207/95e04d72/attachment.html>


More information about the Haskell-Cafe mailing list