Version française
Home     About     Download     Resources     Contact us    
Browse thread
GADT constructor syntax
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ 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:14 PM, Jacques Le Normand <rathereasy@gmail.com> wrote:
>
> having
>
> type 'a t = Foo of 'a : 'b t
>
> creating a constructor of type forall 'a. 'a -> 'a t is really
> confusing since the user explicitly gave the return type of the
> constructor as 'b t.

But why would the user have named 'a in the first place then. In the
context of Foo, it should be assumed that

'a t = 'b t