Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Gabriel Kerneis <kerneis@pps.jussieu.fr>
To: Dario Teixeira <darioteixeira@yahoo.com>
Cc: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>,
	caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Private types in 3.11, again
Date: Wed, 21 Jan 2009 21:17:38 +0100	[thread overview]
Message-ID: <20090121201738.GA7134@kerneis.info> (raw)
In-Reply-To: <361979.82701.qm@web111514.mail.gq1.yahoo.com>

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


  reply	other threads:[~2009-01-21 20:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-15 17:31 Dario Teixeira
2009-01-19 15:09 ` [Caml-list] " Dario Teixeira
2009-01-20 16:33   ` Dario Teixeira
2009-01-20 17:29     ` Jacques Carette
2009-01-20 17:48       ` Dario Teixeira
2009-01-21 10:48       ` Jacques Garrigue
2009-01-21 10:38     ` Jacques Garrigue
2009-01-21 13:22   ` Jacques Garrigue
2009-01-21 19:11     ` Dario Teixeira
2009-01-21 20:17       ` Gabriel Kerneis [this message]
2009-01-21 21:52         ` GADTs in Ocaml (was: Private types in 3.11, again) Dario Teixeira
2009-01-22  1:36       ` [Caml-list] Private types in 3.11, again Jacques Garrigue
2009-01-26 15:13 Dario Teixeira

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090121201738.GA7134@kerneis.info \
    --to=kerneis@pps.jussieu.fr \
    --cc=caml-list@yquem.inria.fr \
    --cc=darioteixeira@yahoo.com \
    --cc=garrigue@math.nagoya-u.ac.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox