From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA26850; Fri, 25 Oct 2002 11:39:11 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 LAA27232 for ; Fri, 25 Oct 2002 11:39:11 +0200 (MET DST) Received: from verdot.inria.fr (verdot.inria.fr [128.93.11.7]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g9P9dA517987 for ; Fri, 25 Oct 2002 11:39:10 +0200 (MET DST) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id LAA10561 for caml-list@inria.fr; Fri, 25 Oct 2002 11:39:10 +0200 Date: Fri, 25 Oct 2002 11:39:09 +0200 From: Daniel de Rauglaudre To: caml-list@inria.fr Subject: Re: [Caml-list] Camlp4: syntax extension in source file Message-ID: <20021025113909.A21492@verdot.inria.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from frisch@clipper.ens.fr on Fri, Oct 25, 2002 at 12:33:48AM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, On Fri, Oct 25, 2002 at 12:33:48AM +0200, Alain Frisch wrote: > > This thread about macro definition with Camlp4 reminds me of an idea I had > some time ago. The idea is to use the Toplevel lib to introduce Caml > syntax extension directly inside source file. Introducing the equivalent of "eval"? This is an old idea, indeed. For the moment, loading the OCaml toplevel does not work: $ camlp4r -I `ocamlc -where` toplevellib.cma Error while loading "lib/ocaml/toplevellib.cma": no implementation available for Outcometree It is because of the module Dynlink which is too severe for interfaces not having implementations. Too severe, probably, and anyway more severe than the linker. Compare the functions "check_consistency" of: 1/ otherlibs/dynlink/dynlink.ml and 2/ bytecomp/bytelink.ml In the case "Not_found", Dynlink refuses while Bytelink accepts. Changing this case in the Dynlink module make the loading work. The next step is to know if it is possible to extract a good "eval" function from the modules Toploop or Topdir. I am not sure. -- Daniel de RAUGLAUDRE http://cristal.inria.fr/~ddr/ ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners