On Jul 12, 2007, at 3:51 , peterv wrote:
Q1) Is it possible to treat a tuple of N elements in a generic way? So
instead of writing functions like lift1 e1, lift2 (e1,e2), lift3
(e1,e2,e3)
just one function liftN that works on tuples of any length?
Q2) (Maybe related to Q1) Can I convert a tuple of length N to a
heterogeneous list (using "forall" aka existentially quantified
types) and
vice versa?
I'm pretty sure the answer to both of those is "no" because each
length / type combination of tuple is an independent type. (But
watch, someone will come along with a TH or SYB solution, or Oleg
will come up with some gruesome type hackery. :)
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university KF8NH
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe