caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jacques GARRIGUE <garrigue@math.nagoya-u.ac.jp>
To: joelr1@gmail.com
Cc: jtbryant@valdosta.edu, caml-list@yquem.inria.fr
Subject: Re: [Caml-list] camlp4 and class introspection
Date: Mon, 11 Jun 2007 09:58:35 +0900 (JST)	[thread overview]
Message-ID: <20070611.095835.2004157669.garrigue@math.nagoya-u.ac.jp> (raw)
In-Reply-To: <7C9995D9-AC11-4E7C-8477-25CA4B88A0F4@gmail.com>

From: Joel Reymont <joelr1@gmail.com>
> On Jun 10, 2007, at 1:14 AM, Jonathan Bryant wrote:
> 
> > I don't think this would be possible since CamlP4 happens before  
> > type inference and therefore knows nothing about types.
> 
> That's really too bad. I was thinking of recognizing that type X was  
> used for instance variables, for example, and generating code to  
> register these appropriately with the Objective-C runtime.

I don't know which classes you want to register with the Objective-C
runtime, but an option is to require users to write .mli files (not
too hard since they can be generated with ocamlc -i).
Then you can use camlp4 to parse the .mli and generate the
registration code to be included in the .ml file. You just have to be
careful about "open" statements.

Jacques Garrigue


  parent reply	other threads:[~2007-06-11  0:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-09 22:59 Joel Reymont
2007-06-10  0:14 ` [Caml-list] " Jonathan Bryant
2007-06-10 12:30   ` Joel Reymont
2007-06-10 20:02     ` Yaron Minsky
2007-06-10 21:18       ` Joel Reymont
2007-06-10 22:07         ` Yaron Minsky
2007-06-11  0:58     ` Jacques GARRIGUE [this message]
2007-06-11  8:05       ` Joel Reymont
2007-06-11 10:11         ` Martin Jambon
2007-06-11 10:16           ` Joel Reymont
2007-06-11 11:36             ` Martin Jambon

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=20070611.095835.2004157669.garrigue@math.nagoya-u.ac.jp \
    --to=garrigue@math.nagoya-u.ac.jp \
    --cc=caml-list@yquem.inria.fr \
    --cc=joelr1@gmail.com \
    --cc=jtbryant@valdosta.edu \
    /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;
as well as URLs for NNTP newsgroup(s).