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=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 1D9A9BC0A for ; Sun, 10 Jun 2007 02:16:18 +0200 (CEST) Received: from sccmmhc92.asp.att.net (sccmmhc92.asp.att.net [204.127.203.212]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5A0GHUX004724 for ; Sun, 10 Jun 2007 02:16:17 +0200 Received: from [192.168.0.104] (12-208-242-210.client.mchsi.com[12.208.242.210]) by sccmmhc92.asp.att.net (sccmmhc92) with SMTP id <20070610001615m9200d9lcre>; Sun, 10 Jun 2007 00:16:15 +0000 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: Cc: caml-list@yquem.inria.fr Content-Transfer-Encoding: 7bit From: Jonathan Bryant Subject: Re: [Caml-list] camlp4 and class introspection Date: Sat, 9 Jun 2007 20:14:31 -0400 To: Joel Reymont X-Mailer: Apple Mail (2.752.3) X-Miltered: at concorde with ID 466B42D1.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 camlp:01 inference:01 runtime:01 beginner's:01 ocaml:01 bug:01 2007,:98 blog:98 beginners:01 wrote:01 caml-list:01 caml-list:01 bin:01 defined:02 On Jun 9, 2007, at 6:59 PM, Joel Reymont wrote: > Is it possible to add code to a class's initialization section > using camlp4? > > I would like to introspect the class definition to print instance > variable names and types. Then I would like to introspect the methods. I don't think this would be possible since CamlP4 happens before type inference and therefore knows nothing about types. > > If anyone could give an example of how this is done with camlp4 > 3.10 I would really appreciate it! > > To explain a bit, I would like to make sure that each defined class > is registered with the Objective-C runtime, only once, not per > object instantiation. > > Thanks, Joel > > -- > http://topdog.cc - EasyLanguage to C# translator > http://wagerlabs.com - Blog > > > > > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs