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 5E018BC69 for ; Sun, 10 Jun 2007 14:30:10 +0200 (CEST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5ACU9Ri032448 for ; Sun, 10 Jun 2007 14:30:10 +0200 Received: by ug-out-1314.google.com with SMTP id p27so1196436ugc for ; Sun, 10 Jun 2007 05:30:09 -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=IcrlngXbbCGkwWgMnYe6UCHc5qOAbaF1Mp5JQT8KrxbjuMrvNr6popTTZ6O2MjZ1uGtw7G7ifpCXKjBa52nd0STrGIJjlXWY33Ta/6d2ojrUHiEAHDGbgFlnJxB9kKPHNExSmkCQPi2DRV4N/RRfQ8hLoqMX3mr5ChXy6mMp7tY= 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=lAX4LgDZnEnZpFpbgNKJWSWJBxrFe9drBci4wsp82BOVrVuoo5ROKN9L766V4HCZ4oDCUmhdxfsitna07OMBxrSBCRNnguHfXLlw+oCwBAHo7/pJV4udd8eRKp1nn4U07l956CzckT6YyISM5la2YWonPMDuWrGFFC5wvYc6JKY= Received: by 10.67.119.9 with SMTP id w9mr4334247ugm.1181478609743; Sun, 10 Jun 2007 05:30:09 -0700 (PDT) Received: from ?192.168.1.35? ( [81.33.210.207]) by mx.google.com with ESMTP id c1sm2980735ugf.2007.06.10.05.30.08 (version=SSLv3 cipher=OTHER); Sun, 10 Jun 2007 05:30:09 -0700 (PDT) In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <7C9995D9-AC11-4E7C-8477-25CA4B88A0F4@gmail.com> Cc: caml-list@yquem.inria.fr Content-Transfer-Encoding: 7bit From: Joel Reymont Subject: Re: [Caml-list] camlp4 and class introspection Date: Sun, 10 Jun 2007 13:30:05 +0100 To: Jonathan Bryant X-Mailer: Apple Mail (2.752.3) X-j-chkmail-Score: MSGID : 466BEED1.001 on discorde : j-chkmail score : XXX : 5/20 1 0.000 -> 3 X-Miltered: at discorde with ID 466BEED1.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 camlp:01 inference:01 runtime:01 ocaml:01 compilation:01 haskell:01 haskell:01 2007,:98 blog:98 wrote:01 caml-list:01 variables:02 types:03 guess:04 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 guess I could build a standalone tool to process OCaml class definitions and do this but I would rather have it as part of the regular compilation workflow. So, in a word, there's no way to achieve what I'm looking for? Haskell people do this using Template Haskell and Camlp4 provides very similar capabilities. Thanks, Joel -- http://topdog.cc - EasyLanguage to C# translator http://wagerlabs.com - Blog