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 RAA22771; Wed, 21 Aug 2002 17:33:41 +0200 (MET DST) 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 RAA22790 for caml-list@pauillac.inria.fr; Wed, 21 Aug 2002 17:33:40 +0200 (MET DST) 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 JAA14527 for ; Wed, 21 Aug 2002 09:37:16 +0200 (MET DST) Received: from mail.info.univ-angers.fr (nes.info.univ-angers.fr [193.49.146.122]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g7L7bG912680 for ; Wed, 21 Aug 2002 09:37:16 +0200 (MET DST) Received: from orion.info-ua (orion.info-ua [172.20.41.6]) by mail.info.univ-angers.fr (Postfix) with ESMTP id 8A0B5935; Wed, 21 Aug 2002 09:37:13 +0200 (CEST) Received: from helios.info-ua (helios.info-ua [172.20.41.5]) by orion.info-ua (Postfix) with ESMTP id ABBBF175CE; Wed, 21 Aug 2002 09:37:13 +0200 (MEST) Received: by helios.info-ua (Postfix, from userid 759) id A2A081421C; Wed, 21 Aug 2002 07:37:12 +0000 (MET) Received: from localhost (localhost [127.0.0.1]) by helios.info-ua (Postfix) with ESMTP id 91A221D82; Wed, 21 Aug 2002 09:37:12 +0200 (MEST) Date: Wed, 21 Aug 2002 09:37:12 +0200 (MEST) From: Vincent Barichard X-X-Sender: barichar@helios.info-ua To: jeanmarc.eber@lexifi.com Cc: CAML-LIST Subject: Re: Fwd: [Caml-list] Re: module managing question In-Reply-To: <1029850596.3d6245e428ec6@imp.pro.proxad.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk En effet, je n'avais pas vu cette nouvelle feature. Je pense qu'elle devrait r=E9soudre mon petit probl=E8me. Merci pour votre aide Vincent On Tue, 20 Aug 2002 jeanmarc.eber@lexifi.com wrote: > N'oubliez pas non plus que depuis ocaml3.05, vous avez la possibilit=E9, > fort pratique, de "d=E9marrer" un toplevel en "pr=E9chargeant" =E0 la lig= ne > de commande des modules (ce qui est =E9quivalent =E0 #load... dans le sou= rce), > mais justement, ce n'est pas dans le source, le rendant ainsi compatible > avec ocamlc. > Ca r=E9soud, je crois, votre probl=E8me (on avait un pb similaire, et on = est > heureux avec cette nouvelle feature). > > Jean-Marc Eber > > > > ----- Forwarded message from Micha=EBl Gr=FCnewald > ----- > Date: 20 Aug 2002 09:42:58 +0200 > From: Micha=EBl Gr=FCnewald > Reply-To: Micha=EBl Gr=FCnewald > Subject: [Caml-list] Re: module managing question > To: caml-list@inria.fr > > Vincent Barichard writes: > > > Hi, > > > > I have a question on the manage of modules files. I use the toplevel > > system to make some algorithms and then I compile them to get efficient > > executable file. > > Is it possible to have exactly the same files for the two stage. For > > example, in the ocaml toplevel, I load the two following files a.ml and > > b.ml with the #use command. > > > > In a file named a.ml, I have : > > module A =3D struct > > =09let f =3D function _ -> 0 > > end > > > > In a second file named b.ml, I have : > > module B =3D struct > > =09open A > > > > =09let g =3D f > > end > > > > Everything works well. > > But when I want to compile them, I have to put in comments the "(*modul= e ? > > =3D struct*)" and the "(* end *)" to make it works. > > Is there another way to proceed ? > > In the toplevel loop you can type `#load "a.cmo";;' after you compiled a, > it will load the compilation unit so-named, and make available the module > 'A'. The name is because 'A' is the Capitalisation of the basename for > `a.cmo' not because of you said `module A =3D struct ... end' in the file > `a.ml'. The full qualified name for the `f' function is `A.A.f' > > Yous should take a look at the chapers about `modules, the `ocamlc' and > `ocamlmktop' tools, and the chapter `modules and the filesystem' in the > books `The objective caml system - ' and the `D=E9veloppement > d'apllications avec Objective Caml'that are both available online from th= e > caml.inria website. > > -- > Micha=EBl Gr=FCnewald - RSA PGP Key ID: 0= x20D90C12 > ------------------- > To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inr= ia.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 > > ----- End forwarded message ----- > Vincent Barichard M=E9taheuristiques et Optimisation Combinatoire Facult=E9 des Sciences d'Angers Tel : 02 41 73 52 06 ------------------- 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