Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Private types in 3.11, again
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-01-21 (20:17)
From: Gabriel Kerneis <kerneis@p...>
Subject: Re: [Caml-list] Private types in 3.11, again

On Wed, Jan 21, 2009 at 11:11:14AM -0800, Dario Teixeira wrote:
> So my question is whether it
> is at all possible to emulate GADTs using only PV + phantom types, or if on the
> contrary one needs to use the object system in these cases, as exemplified by
> solution c).  In other words, is solution a) futile, or did you use the object
> system in solution c) simply because you were also using regular variants?

I didn't followed the thread closely, but did you have a look at Ocsigen's way
to implement params_type?
(from line 146)

I don't know what it's worth, but anyway it uses only PV (and Obj.magic).

Gabriel Kerneis