From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 79F9ABB81 for ; Fri, 2 Dec 2005 10:10:03 +0100 (CET) Received: from smtp2.syd.swiftdsl.com.au (smtp2.syd.swiftdsl.com.au [218.214.225.98]) by nez-perce.inria.fr (8.13.0/8.13.0) with SMTP id jB29A0Hv031430 for ; Fri, 2 Dec 2005 10:10:02 +0100 Received: (qmail 18391 invoked from network); 2 Dec 2005 09:10:13 -0000 Received: from unknown (HELO coltrane.mega-nerd.net) (218.214.64.136) by smtp2.syd.swiftdsl.com.au with SMTP; 2 Dec 2005 09:10:13 -0000 Received: from coltrane (localhost [127.0.0.1]) by coltrane.mega-nerd.net (Postfix) with SMTP id DC4117B68 for ; Fri, 2 Dec 2005 20:09:57 +1100 (EST) Date: Fri, 2 Dec 2005 20:09:57 +1100 From: Erik de Castro Lopo To: caml-list@yquem.inria.fr Subject: Reporting on sucess/failure of tail recursion Message-Id: <20051202200957.2fb14d49.ocaml-erikd@mega-nerd.com> Organization: Erik Conspiracy Secret Labs X-Mailer: Sylpheed version 2.0.0 (GTK+ 2.6.10; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 43900F68.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; recursion:01 ocaml:01 recursive:01 recursive:01 compiler:01 cheers:01 tail:01 tail:01 functions:01 functions:01 complex:04 erik:04 erik:04 feature:08 function:08 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Hi all, Say I have a file containing a number if Ocaml functions. We all know the advantages of tail recursive functions over non-tail recursive ones and some of us know if a simple function is tail recursice just by looking at it. However, for more complex functions it would be really nice if there was a compiler mode that could print which recursive functions in a file were tail recursive and which were not. Is there a way to do this? Does anyone else think this would be a useful feature? Cheers, Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo +-----------------------------------------------------------+ "I saw `cout' being shifted "Hello world" times to the left and stopped right there." -- Steve Gonedes