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 DAA28092; Tue, 1 Jul 2003 03:49:56 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id DAA27773 for ; Tue, 1 Jul 2003 03:49:55 +0200 (MET DST) Received: from mz2.forethought.net (mzpi4.forethought.net [216.241.36.13]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h611nsf08259 for ; Tue, 1 Jul 2003 03:49:54 +0200 (MET DST) Received: from [216.241.35.41] (helo=swordfish) by mz2.forethought.net with esmtp (Exim 4.14) id 19XAHJ-00016p-Gm for caml-list@pauillac.inria.fr; Mon, 30 Jun 2003 19:49:53 -0600 Received: from matt by swordfish with local (Exim 3.35 #1 (Debian)) id 19XAHL-0003GU-00 for ; Mon, 30 Jun 2003 19:49:55 -0600 Date: Mon, 30 Jun 2003 19:49:54 -0600 From: Matt Gushee To: caml-list@pauillac.inria.fr Subject: Re: [Caml-list] how to use a module Message-ID: <20030701014954.GN4225@swordfish> Reply-To: Matt Gushee Mail-Followup-To: caml-list@pauillac.inria.fr References: <004d01c33f46$2f16f480$fdbf0950@zofo> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <004d01c33f46$2f16f480$fdbf0950@zofo> User-Agent: Mutt/1.3.27i X-Spam: no; 0.00; gushee:01 mgushee:01 havenrock:01 caml-list:01 qux:99 passing:01 readline:01 getline:01 englewood:01 manure:01 ignores:01 --lao:01 merel:01 cmo:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, Jun 30, 2003 at 10:11:54PM +0200, Jean-Baptiste Rouquier wrote: > > (*if you file is already compiled, you can use :*) > #load "qux.cmo";; If you know in advance what you want to load, you can also load it by passing it as an argument to the toplevel, e.g.: $ ocaml qux.cmo I prefer this approach because it cuts down on the characters I have to retype when I make errors (Note to OCaml team: can we *please* get some kind of history-editing functionality in the toplevel? I know there are licensing and portability issues with GNU readline, but what about the getline library used by OCaml2?) This approach is also handy if you want to quickly check your syntax: $ ocaml my_new_module.ml This doesn't give you an interactive shell, so it's different from $ ocaml # #use "my_new_module.ml";; But it will tell you if there are errors in your code. -- Matt Gushee When a nation follows the Way, Englewood, Colorado, USA Horses bear manure through mgushee@havenrock.com its fields; http://www.havenrock.com/ When a nation ignores the Way, Horses bear soldiers through its streets. --Lao Tzu (Peter Merel, trans.) ------------------- 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