From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 0998DBC0B for ; Wed, 13 Dec 2006 15:31:48 +0100 (CET) Received: from gw.trusted-logic.com (gw.trusted-logic.com [62.240.237.74]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id kBDEVlbU010329 for ; Wed, 13 Dec 2006 15:31:47 +0100 Received: from localhost (maio.trusted-logic.fr [127.0.0.1]) by gw.trusted-logic.com (Postfix) with ESMTP id 5873953C163 for ; Wed, 13 Dec 2006 15:31:47 +0100 (CET) Received: from gw.trusted-logic.com ([127.0.0.1]) by localhost (maio [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 14100-06 for ; Wed, 13 Dec 2006 15:31:47 +0100 (CET) Received: from [192.168.1.94] (unknown [192.168.1.94]) by gw.trusted-logic.com (Postfix) with ESMTP id A2D8B53C14A for ; Wed, 13 Dec 2006 15:31:46 +0100 (CET) Message-ID: <45800ED6.2060009@trusted-logic.fr> Date: Wed, 13 Dec 2006 15:31:50 +0100 From: Yann Coscoy Organization: Trusted Logic User-Agent: Thunderbird 1.5.0.8 (X11/20061117) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] How to refactor a large Ocaml program References: <457FF423.7000703@abc.se> <20061213130922.GA17914@pulp.rsise.anu.edu.au> <4580079B.1020101@trusted-logic.fr> <200612131409.24433.jon@ffconsultancy.com> In-Reply-To: <200612131409.24433.jon@ffconsultancy.com> X-Enigmail-Version: 0.94.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at trusted-logic.fr X-Miltered: at discorde with ID 45800ED3.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; refactor:01 ocaml:01 ocaml:01 lexer:01 parser:01 compiler:01 parsing:01 rewriting:01 emacs:01 lexer:01 parser:01 wrote:01 caml-list:01 ast:02 exists:03 Jon Harrop a écrit : > On Wednesday 13 December 2006 14:00, Yann Coscoy wrote: >> And if these tools do not exists it is not because nobody need nor want >> them. It is because it requires a huge effort to have good ones. And >> nobody has done is effort yet. > > I don't think it would be a huge effort to write refactoring tools for OCaml. > Indeed, I've propose this idea for F#. The hard part is writing the lexer and > parser, which is already found in the front end of the compiler (albeit > without parsing of comments). Then you're just rewriting an AST, which is a > piece of cake in ML. :-) > I don't think either that it is difficult to write a refactoring tools for OCaml. But I still believe it is would be huge effort to have a *good* tool to do it. When I say a good tool, I think of something user-friendly, with nice interface (graphical or not)... In a word something that would convince you to use it instead of search/replace under emacs (or vi). The hard part is not writing the lexer and the parser, the hard part is to make some environment to interact with the developer. Yann Coscoy