Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] unused function detection
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-06-22 (19:27)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] unused function detection
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,
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: