From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 8F3C2BC69 for ; Mon, 11 Jun 2007 12:16:37 +0200 (CEST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5BAGbMh006044 for ; Mon, 11 Jun 2007 12:16:37 +0200 Received: by ug-out-1314.google.com with SMTP id p27so1346535ugc for ; Mon, 11 Jun 2007 03:16:37 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=JyLCyioJBADrhC1XH1bbX40opsCZX/z5WOaR3cK1tfquKOkowbUK21EgG4aTjPqUmgRbEga1bKujq9r+Tk6Nycv5gfPN2jsqpq87AaJuGYSRvCvN7GbOdbOLRtgNyTg4icj4TeGp5+/HumZhWpD7XdmZH8crxEp0VOT9gmQU1Q4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=N9xwzEsoRZKcc92uBPbV7rZOr+ryTL/Zy7R1R2Lo3pQrLMWP/213Z68GQJ/Xe/3RwObNQMBJTym3jlOw/Bmk8kfRTQ9izxIkEyWnsIxBAzq4SGk6nRUwVlbv8nMvdmzSflEiYlCaDcts+5WQklNE8dQn/4C4tHIOgxrTvju2GLQ= Received: by 10.82.134.12 with SMTP id h12mr10543675bud.1181556996442; Mon, 11 Jun 2007 03:16:36 -0700 (PDT) Received: from ?192.168.1.35? ( [81.33.210.207]) by mx.google.com with ESMTP id h6sm10201254nfh.2007.06.11.03.16.34 (version=SSLv3 cipher=OTHER); Mon, 11 Jun 2007 03:16:35 -0700 (PDT) In-Reply-To: References: <7C9995D9-AC11-4E7C-8477-25CA4B88A0F4@gmail.com> <20070611.095835.2004157669.garrigue@math.nagoya-u.ac.jp> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <9D18E795-9FAA-4933-AB70-49EEF6D62581@gmail.com> Cc: Jacques GARRIGUE , jtbryant@valdosta.edu, caml-list@yquem.inria.fr Content-Transfer-Encoding: 7bit From: Joel Reymont Subject: Re: [Caml-list] camlp4 and class introspection Date: Mon, 11 Jun 2007 11:16:31 +0100 To: Martin Jambon X-Mailer: Apple Mail (2.752.3) X-j-chkmail-Score: MSGID : 466D2105.000 on discorde : j-chkmail score : XXX : 5/20 1 0.000 -> 3 X-Miltered: at discorde with ID 466D2105.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 yaron:01 ocaml:01 annotation:01 ocaml-like:01 ocaml:01 camlp:01 syntax:01 doable:01 2007,:98 blog:98 wrote:01 caml-list:01 jambon:01 equivalents:02 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? > 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