caml-list  

Re: [Caml-list] Private types in 3.11, again

Gabriel Kerneis
Wed, 21 Jan 2009 12:17:54 -0800

Hi,

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?

http://ocsigen.org/trac/browser/server/ocsigen.ml?rev=183
(from line 146)

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

Regards,
-- 
Gabriel Kerneis

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs