Browse thread
GADT constructor syntax
[
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: | Lukasz Stafiniak <lukstafi@g...> |
| Subject: | Re: [Caml-list] GADT constructor syntax |
On Sat, Dec 4, 2010 at 9:54 PM, Jacques Le Normand <rathereasy@gmail.com> wrote: > you may want to name your type parameters because you can mix GADT > constructors with normal constructors. consider: > > type 'a term = > | Ignore of 'a term : int term > | Embed of 'a > > I don't think propagating type parameters is a good idea. The current > rule is: ignore type parameters in GADT constructors. This is simpler > than unifying the type parameters with the arguments of the return > type of the constructor. But it expands to: > type 'a term = > | Ignore of 'a term : int term > | Embed of 'a : 'a term