[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | nr@e... |
| Subject: | type abbreviation for open polymorhic variants? |
I wish to define an abbreviation for the following type:
[> `Nil
| `Number of float
| `String of string
| `Function of func
| `Table of table
]
I am assuming that the underlying machinery involves something like
row polymorphism, but I don't know how to name the 'row variable'.
I tried
type 'a t = ['a
| `Nil
| `Number of float
| `String of string
| `Function of func
| `Table of table
]
but this suggestion was roundly rejected by the compiler.
Does anybody know how to do this? I couldn't find anything in the
syntax for polymorphic-variant type expressions.
Norman