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 SAA32291; Sat, 11 Sep 2004 18:14:06 +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 SAA32446 for ; Sat, 11 Sep 2004 18:14:05 +0200 (MET DST) Received: from mwinf0908.wanadoo.fr (smtp9.wanadoo.fr [193.252.22.22]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i8BGE5uZ004673 for ; Sat, 11 Sep 2004 18:14:05 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf0908.wanadoo.fr (SMTP Server) with SMTP id E3FF01800136; Sat, 11 Sep 2004 18:14:04 +0200 (CEST) Received: from morgana (ARennes-303-1-25-131.w81-53.abo.wanadoo.fr [81.53.41.131]) by mwinf0908.wanadoo.fr (SMTP Server) with ESMTP id B8F00180012C; Sat, 11 Sep 2004 18:14:04 +0200 (CEST) Received: from david by morgana with local (Exim 4.34) id 1C6AVh-0001Zh-N3; Sat, 11 Sep 2004 18:13:57 +0200 To: Malte Obbel Forsberg Cc: caml-list@inria.fr Subject: Re: [Caml-list] Problem with ocamlmktop References: <41422A93.8020606@unix.se> From: David MENTRE Organization: none Date: Sat, 11 Sep 2004 18:13:57 +0200 In-Reply-To: <41422A93.8020606@unix.se> (Malte Obbel Forsberg's message of "Sat, 11 Sep 2004 00:28:35 +0200") Message-ID: <87fz5ovl4q.fsf@linux-france.org> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Miltered: at nez-perce with ID 4143244D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 ocamlmktop:01 dmentre:01 ocml:01 ocaml-code:01 dmentre:01 ocaml:01 ocaml:01 toplevel:01 writes:01 mentre:01 mentre:01 enlighten:02 unix:02 redefine:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, Malte Obbel Forsberg writes: > Now, what I want to do is to use a modified toplevel for mod_ocaml, so I > won't have to redefine my functions in every ocml (html with ocaml-code > in it, handled by mod_ocaml) file! I suppose, being quite new to O'Caml, > I might have missed some other way to achieve this; please enlighten me > if that is so. :-) You could use -I option with an absolute path when calling your home made ocaml. > What I want to know, then, is if there is some way to define functions > in an external file and then use the functions in an other interpreted > file, with "open Site;;" or similar. Yep. #load "file-name";; or #use "file-name";; depending on your needs. Then do a open Module or Module.function. See ocaml doc for details. Yours, david -- David Mentré ------------------- 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