[This message is sent through a WWW-Email gateway.]
[The authenticity of the sender can not be validated.]
[Message sent from the following machine sailor.lib.md.us - 198.76.201.196 ]
[after accessing this URL ]
--
Wouldn't a parallel implementation of Haskell also be useful for
single-processor
[This message is sent through a WWW-Email gateway.]
[The authenticity of the sender can not be validated.]
[Message sent from the following machine sailor.lib.md.us - 198.76.201.196 ]
[after accessing this URL ]
--
You can use nested pairss? Of multiple types? I tried this and it
failed. I don't
>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
>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:
> > [...]
On Fri, 13 Nov 1998, Fergus Henderson wrote:
> > It would
> > avoid the nastiness of a special definition for each tuple type and and
> > lead to more flexibility.
>
> I want each tuple arity to be a different type, so that I get a compile
> error rather than a run-time error if say I pass a 3-tu
> >
> > [...] if you dislike tuples you can use nested pairs
>
> At the cost of losing a little type-safety.
That's really a very minimal loss. (And it's not really a loss of
type safety, just the possibilty of confusing a part of a "tuple" with
another "tuple"). I'd be more worried about the
> I think it would be
> really nice if it were possible to create a container capable of
> containing any number of objects of any number of types It would
That's not possible in Haskell. Since you want an any number
of different types in this new type it would need to have a variable
numbe