Version française
Home     About     Download     Resources     Contact us    
Browse thread
camlp4 and class introspection
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Joel Reymont <joelr1@g...>
Subject: Re: [Caml-list] camlp4 and class introspection

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