Mark Tullsen wrote:
> Matt Harden wrote:
> >    o  A Zippable class be created, defining zip and unzip for all tuple
> > types (or at least the first few)
> 
> For _all_ tuple types?  That's a lot of instance declarations ;-)!

No doubt.  But seriously, I was thinking of a "built-in" Zippable
instance just like we have for Ord, Enum, Show, etc.  I think the
language definition specifies these instances for all tuple types that
have sensible instances of these classes.  Actual Haskell
implementations don't provide these instances for all tuples, AFAIK.

> <shameless plug>
> 
> I have a paper ("The Zip Calculus", MPC 2000) which is a bit more
> ambitious, and is correspondingly more complex.  My solution allows
> one to write the generic zip without use of the class system and
> the theoretic need for an infinite number of instance declarations.
> It allows you to write transpose
>   transpose  :: ((a,b),(c,d),(e,f)) -> ((a,c,e),(b,d,f))
> generically for any m*n "matrix".
> 
> I hope to write up a proposal for how to add this capability to Haskell
> in the not too distant future.
> 
> You can get the paper here if you're interested:
>   http://cs-www.cs.yale.edu/~tullsen/zip-mpc.ps

I have lots of questions, but I'll wait until I've read your paper.

Thanks!
Matt Harden

Reply via email to