From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA09210 for caml-red; Tue, 31 Oct 2000 12:06:27 +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 MAA02928 for ; Tue, 31 Oct 2000 12:06:14 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id e9VB6E116993; Tue, 31 Oct 2000 12:06:14 +0100 (MET) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA30612; Tue, 31 Oct 2000 12:06:13 +0100 (MET) From: Pierre Weis Message-Id: <200010311106.MAA30612@pauillac.inria.fr> Subject: Re: Redefinition doesn't work In-Reply-To: <87hf5t99xx.fsf@jay.koscom.co.kr> from Jaeyoun Chung at "Oct 31, 100 08:38:18 am" To: jay@kldp.org Date: Tue, 31 Oct 2000 12:06:13 +0100 (MET) Cc: caml-list@inria.fr X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: weis@pauillac.inria.fr Jaeyoun Chung (mailto:jay@kldp.org) wrote: > this is quite true but the above feature for the toplevel is quite useful > during the development phase. if each time we should redefine everything > dependent on one function, toplevel isn't quite that useful -- to find out > the dependencies or just reload everything dependent on the file > containing the function is what should have be done automatically. what > about having an option or directive so that user can control the behavior? We already have one: #use "filename.ml";; For instance, you can use a loadall.ml file that contains the list of #use directives that load the files that made your program. > when user redefines some function, isn't it exactly the user's intention > to redefine all the bindings already defined not only those following that > redefinition? No, I guess it is not the intention of the user, since he does not know the set of bindings that uses the function he is redefining. If you want to test, you can use the Ocaml feature that effectively redefines functions the way you suggest they should be, namely the #trace directive. For instance: # #trace List.iter;; List.iter is now traced. # 1;; Pierre Weis INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/