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 JAA10813; Sat, 9 Feb 2002 09:52:43 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA10828 for caml-list@pauillac.inria.fr; Sat, 9 Feb 2002 09:52:43 +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 WAA04805 for ; Fri, 8 Feb 2002 22:00:28 +0100 (MET) Received: from calliope1.fm.intel.com (fmfdns01.fm.intel.com [132.233.247.10]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g18L0Qr16110 for ; Fri, 8 Feb 2002 22:00:26 +0100 (MET) Received: from fmsmsxvs043.fm.intel.com (fmsmsxv043-1.fm.intel.com [132.233.48.128]) by calliope1.fm.intel.com (8.9.1a+p1/8.9.1/d: relay.m4,v 1.49 2002/01/25 02:16:58 root Exp $) with SMTP id VAA27491 for ; Fri, 8 Feb 2002 21:00:24 GMT Received: from fmsmsx28.fm.intel.com ([132.233.42.28]) by fmsmsxvs043.fm.intel.com (NAVGW 2.5.1.16) with SMTP id M2002020812593228890 ; Fri, 08 Feb 2002 12:59:32 -0800 Received: by fmsmsx28.fm.intel.com with Internet Mail Service (5.5.2653.19) id ; Fri, 8 Feb 2002 13:00:23 -0800 Message-ID: From: "Harrison, John R" To: "'caml-list@inria.fr'" Cc: "Harrison, John R" , 'johnh@ichips.intel.com' Subject: [Caml-list] Questions about #use Date: Fri, 8 Feb 2002 13:00:15 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="ISO-8859-1" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk The documentation for the "#use" directive says "phrases are processed just as if they were typed on standard input". However according to my experience with OCaml, this isn't really accurate. Some level of syntax checking is first done on the whole file before any phrases are processed. For example, a syntax error on the last line will prevent any phrases from being fully processed. I'd like a function that does indeed display the behaviour implied by the documentation, i.e. handles the toplevel phrases successively. Is this easily done? I would also like to be able to issue an analogous directive dynamically (e.g. to read files from a program-specific search path). Since "#use" isn't a CAML value, I can't use it. Digging around in the sources I came up with the following, which seems to work: Toplevel.use_file Format.std_formatter However, I didn't find any means of doing dynamic loading of source mentioned in the documentation. Is the above safe or is something else recommended? John. ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr