nested pairs (was Re: monomorphism etc.)

1998-11-12 Thread Claus Reinke
But if you dislike tuples you can use nested pairs, like infixr 0 :. data T a b = a :. b Now you can write 'a' :. True :. "Hello" :. () which has type T Char (T Bool (T String ())) But I guess that's not what you were after? -- Lennart Fergus replied: [...] if you dislike

Re: nested pairs (was Re: monomorphism etc.)

1998-11-12 Thread Claus Reinke
PS. I've got a length function for ``heterogeneous lists'', as they appear in nested pairs, in Hugs. However, it uses the type system extensions available in 1.3c or in 1.4 [98 BETA]. How much can you do in plain Haskell??? in Cayenne?-) oops. On second thought, this length