a question concerning type constructors

Hi all, In Haskell, is it possible to declare a type constructor with a variable number of type variables e.g. data Tuple * .... allowing the following declarations: t: Tuple u: Tuple Bool v: Tuple Bool Int w: Tuple Bool Int Char ? E.

On Sat, May 05, 2007 at 02:26:45PM +0100, Eric wrote:
Hi all,
In Haskell, is it possible to declare a type constructor with a variable number of type variables e.g.
data Tuple * ....
allowing the following declarations:
t: Tuple u: Tuple Bool v: Tuple Bool Int w: Tuple Bool Int Char
No. (nor is it possible to be kind-polymorphic at all) Stefan

I'm not sure what you want to accomplish, but if you like type
hackery, this might be helpful:
http://okmij.org/ftp/Haskell/types.html#polyvar-fn
On 5/5/07, Eric
Hi all,
In Haskell, is it possible to declare a type constructor with a variable number of type variables e.g.
data Tuple * ....
allowing the following declarations:
t: Tuple u: Tuple Bool v: Tuple Bool Int w: Tuple Bool Int Char
?
E.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (3)
-
Eric
-
Joshua Ball
-
Stefan O'Rear