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 VAA02186; Tue, 22 Jun 2004 21:27:36 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 VAA02141 for ; Tue, 22 Jun 2004 21:27:35 +0200 (MET DST) Received: from smtp1.adl2.internode.on.net (smtp1.adl2.internode.on.net [203.16.214.181]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i5MJRISH021562 for ; Tue, 22 Jun 2004 21:27:24 +0200 Received: from [192.168.1.200] (ppp215-31.lns1.syd2.internode.on.net [203.122.215.31]) by smtp1.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id i5MJR94Y074436; Wed, 23 Jun 2004 04:57:10 +0930 (CST) Subject: Re: [Caml-list] unused function detection From: skaller Reply-To: skaller@users.sourceforge.net To: Michael Furr Cc: caml-list In-Reply-To: References: Content-Type: text/plain Message-Id: <1087932428.29427.33.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 23 Jun 2004 05:27:08 +1000 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 40D88816.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 sourceforge:01 2004:99 opaque:01 re-implement:01 ocamldep:01 9660:01 glebe:01 ocaml:01 nsw:01 snail:02 compile:02 modules:02 checkout:02 module:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, 2004-06-23 at 04:33, Michael Furr wrote: > I just finished(well almost) writing a tool which does something very > similar. The motivation was if I have some module M and a program P, what > is the most general(opaque) signature for M which still lets P compile. > This information can be extremely useful since you know exactly which > types are used opaquely and thus you can safely re-implement those data > structures. Also, if you have some internal function in a module and it > is not used anywhere in the program, it won't show up in the resulting > signature. ocaml -i + ocamldep. Shaken (not stirred) Hmmm. At present, you are looking for uses of functions M.f1 M.f2 M.f3 ... in modules P1 P2 P3 P4 .. To solve my problem, you only need to add M to that list, looking for uses of M.f1 etc in M itself. [Of course I want the complement of the answer .. ] -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net ------------------- 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