From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTP id 69F1A7FBC8 for ; Thu, 8 Jan 2015 16:50:49 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of agarwal1975@gmail.com) identity=pra; client-ip=74.125.82.50; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="agarwal1975@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of agarwal1975@gmail.com designates 74.125.82.50 as permitted sender) identity=mailfrom; client-ip=74.125.82.50; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="agarwal1975@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wg0-f50.google.com) identity=helo; client-ip=74.125.82.50; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="postmaster@mail-wg0-f50.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Al0AAH+mrlRKfVIym2dsb2JhbABcg1hYBIMBszaNXYFphXMCgQkHQwEBAQEBEQEBAQEBBgsLCRQuhAwBAQEDARIRHQEbEgsBAwELBgMCBAcNDR0CAiIBEQEFAQoSBhMIChCHdQEDCQgNlX+QSz4xiy6Ba4J3imcKGScDChU/gmkBAQEBAQEEAQEBAQEBARUBBQ6NXoIJBAeCaIFBBYQ3BoUih01KhUSBPo5mEiOBDAmELiAxAQGCQQEBAQ X-IPAS-Result: Al0AAH+mrlRKfVIym2dsb2JhbABcg1hYBIMBszaNXYFphXMCgQkHQwEBAQEBEQEBAQEBBgsLCRQuhAwBAQEDARIRHQEbEgsBAwELBgMCBAcNDR0CAiIBEQEFAQoSBhMIChCHdQEDCQgNlX+QSz4xiy6Ba4J3imcKGScDChU/gmkBAQEBAQEEAQEBAQEBARUBBQ6NXoIJBAeCaIFBBYQ3BoUih01KhUSBPo5mEiOBDAmELiAxAQGCQQEBAQ X-IronPort-AV: E=Sophos;i="5.07,723,1413237600"; d="scan'208";a="116214161" Received: from mail-wg0-f50.google.com ([74.125.82.50]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 08 Jan 2015 16:50:48 +0100 Received: by mail-wg0-f50.google.com with SMTP id a1so3337326wgh.9 for ; Thu, 08 Jan 2015 07:50:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=1M9WbY/lTbCHICw+4jbDfKb8cZdxb1/32RshJ+ryV2k=; b=vxmXhqouBpAW2N22pSQERxkwHSSckWhJ15yC8ICW7iZj0MrR9NIHwCp2ukM4iZ14TT m0K2wrBalQNw/A/yXCpwbeZ8+6wQ9kVGLUMiIEN+nRK693p/+hnoG+7Oy+BIa7XmQ7Ao lkp5/fyB739mZ9sKj2Blp2G4XO+YcC9Go8nSNcq+2Lpdvl3sgBscUezxublPL7xuLvD9 oGtmEFK+zYrodaVsSb9Onks6r0hJ3YcJmWFOYy9GitSLxrk+U0RXhhZP94cW+rPn9eQB ZhjQx4EWUrTB8bri6emQuaYj1Op8X9hEwR6f5xSphx/t0LAxLxRu8JH/7b5htslUxqTw DI2g== X-Received: by 10.194.90.10 with SMTP id bs10mr20926761wjb.43.1420732248664; Thu, 08 Jan 2015 07:50:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.27.15.20 with HTTP; Thu, 8 Jan 2015 07:50:27 -0800 (PST) In-Reply-To: <20150108153342.GB4890@frosties> References: <20150108133111.GA3745@pl-59055.rocqadm.inria.fr> <54AE8A9C.5090304@glondu.net> <20150108153342.GB4890@frosties> From: Ashish Agarwal Date: Thu, 8 Jan 2015 10:50:27 -0500 Message-ID: To: Goswin von Brederlow Cc: Caml List Content-Type: multipart/alternative; boundary=047d7bd9058e00b50e050c2601c6 Subject: Re: [Caml-list] Detecting dead code, discovering a project's structure... --047d7bd9058e00b50e050c2601c6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Maybe Pfff: https://github.com/facebook/pfff On Thu, Jan 8, 2015 at 10:33 AM, Goswin von Brederlow wrote: > On Thu, Jan 08, 2015 at 02:48:12PM +0100, St=C3=A9phane Glondu wrote: > > Le 08/01/2015 14:31, S=C3=A9bastien Hinderer a =C3=A9crit : > > > Are there tools / techniques one could use to make it easier to > > > discover / explore the source code of a big OCaml project? > > > > > > In particular, are there any tools available to help finding dead co= de > > > or coe that may need some refactoring? > > > > > > Many thanks for any suggestion. > > > > One suggestion: http://home.gna.org/oug/index.fr.html > > > > > > Cheers, > > That looks cool. But that still needs a lot of manual filtering to get > results, e.g. to find an unused type or function specified in the > input signature for a functor. > > It could be nice for ocaml to have warnings for this directly. E.g.: > > module type M =3D ssig type t type s val x : int end > moduel F(M : M) =3D struct type t =3D M.t end > > Warning: unused value x in signature M for functor F > Warning: unused type s in signature M for functor F > > Similar for types / values defined but not used in .ml files that do > not appear in the .mli file. > > MfG > Goswin > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > --047d7bd9058e00b50e050c2601c6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On Thu, Jan 8, 2015 at 10:33 AM, Gosw= in von Brederlow <goswin-v-b@web.de> wrote:
On Thu, Jan 08, 2015 at 02:48:12PM +0100= , St=C3=A9phane Glondu wrote:
> Le 08/01/2015 14:31, S=C3=A9bastien Hinderer a =C3=A9crit :
> > Are there tools / techniques one could use to make it easier to > > discover / explore the source code of a big OCaml project?
> >
> > In particular,=C2=A0 are there any tools available to help findin= g dead code
> > or coe that may need some refactoring?
> >
> > Many thanks for any suggestion.
>
> One suggestion: http://home.gna.org/oug/index.fr.html
>
>
> Cheers,

That looks cool. But that still needs a lot of manual filtering to g= et
results, e.g. to find an unused type or function specified in the
input signature for a functor.

It could be nice for ocaml to have warnings for this directly. E.g.:

module type M =3D ssig type t type s val x : int end
moduel F(M : M) =3D struct type t =3D M.t end

Warning: unused value x in signature M for functor F
Warning: unused type s in signature M for functor F

Similar for types / values defined but not used in .ml files that do
not appear in the .mli file.

MfG
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = Goswin

--
Caml-list mailing list.=C2=A0 Subscription management and archives:
ht= tps://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

--047d7bd9058e00b50e050c2601c6--