From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA16807 for caml-red; Fri, 3 Nov 2000 10:22:18 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id AAA00119 for ; Fri, 3 Nov 2000 00:36:10 +0100 (MET) Received: from math.berkeley.edu (gold.Math.Berkeley.EDU [169.229.58.61]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id eA2Na9r26115 for ; Fri, 3 Nov 2000 00:36:09 +0100 (MET) Received: from yuban-c.math.berkeley.edu (blue1.Math.Berkeley.EDU [169.229.58.58]) by math.berkeley.edu (8.9.3/8.9.3) with ESMTP id PAA20943; Thu, 2 Nov 2000 15:36:08 -0800 (PST) Received: (from datta@localhost) by yuban-c.math.berkeley.edu (8.9.3/8.9.3) id PAA06943; Thu, 2 Nov 2000 15:35:46 -0800 (PST) Date: Thu, 2 Nov 2000 15:35:46 -0800 From: Ruchira Datta To: caml-list@inria.fr Subject: Re: question on integrating the toplevel in an O'Caml app Message-ID: <20001102153546.A6824@blue1.berkeley.edu> Reply-To: datta@math.berkeley.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: weis@pauillac.inria.fr Stephan Houben wrote: >These all seem things the interpreter does now. In the crudest set-up, >I would simply send string to the interpreter. However, a better >approach might be to actually send the AST to the interpreter. >I also need to get the type information. A crude approach would be again >to ask the interpreter to evaluate something like module M = Blah, >and look at the result. again, I suppose a better approach would be >to get the data structure inside the compiler back. Have you looked at Camlp4? It allows users to extend/redefine the concrete syntax, and IIRC it has some code like what you are looking for above to facilitate this. Ruchira Datta datta@math.berkeley.edu