caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Martin Jambon <martin.jambon@ens-lyon.org>
To: Joel Reymont <joelr1@gmail.com>
Cc: Jacques GARRIGUE <garrigue@math.nagoya-u.ac.jp>,
	jtbryant@valdosta.edu, caml-list@yquem.inria.fr
Subject: Re: [Caml-list] camlp4 and class introspection
Date: Mon, 11 Jun 2007 13:36:09 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0706111333420.15439@martin.ec.wink.com> (raw)
In-Reply-To: <9D18E795-9FAA-4933-AB70-49EEF6D62581@gmail.com>

On Mon, 11 Jun 2007, Joel Reymont wrote:

>
> On Jun 11, 2007, at 11:11 AM, Martin Jambon wrote:
>
>> - introduce a special kind of type definitions (like Yaron suggested), so 
>> that only these would generate Objective-C code. The big advantage is that 
>> you could add options.
>
> This is the approach that I like but I can't visualize what  special kind of 
> type definition is.
>
>> For example, if an OCaml type has 2 equivalents in Objective-C, you could 
>> add an annotation to choose which one to use.
>
> What would this look like? Can you give me an example?

json-static (there are others...)
To export an (key, value) list from OCaml, you can choose a JSON object or 
a JSON array of arrays of 2 elements.

>> It makes OCaml-like type definitions, which usually do not cover all 
>> possible type definitions and are not compatible with standard OCaml.
>
> Right, to be handled by Camlp4 only. I don't want the syntax to stray too far 
> from OCaml, though.
>
> There's much to learn for me here, how to extend the class definition in 
> Camlp4 to add bridging code, for example. I'm glad that it seems to be 
> doable, though.
>
> 	Thanks, Joel
>
> --
> http: //topdog.cc      - EasyLanguage to C# translator
> http: //wagerlabs.com  - Blog
>
>
>
>
>
>


      reply	other threads:[~2007-06-11 11:36 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
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 [this message]

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=Pine.LNX.4.64.0706111333420.15439@martin.ec.wink.com \
    --to=martin.jambon@ens-lyon.org \
    --cc=caml-list@yquem.inria.fr \
    --cc=garrigue@math.nagoya-u.ac.jp \
    --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).