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 SAA21735; Wed, 7 Apr 2004 18:40:50 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA21809 for ; Wed, 7 Apr 2004 18:40:48 +0200 (MET DST) From: brogoff@speakeasy.net Received: from mail4.speakeasy.net (mail4.speakeasy.net [216.254.0.204]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i37Gfdjq031289 for ; Wed, 7 Apr 2004 18:41:40 +0200 Received: (qmail 1342 invoked from network); 7 Apr 2004 16:40:45 -0000 Received: from grace.speakeasy.net ([216.254.0.22]) (envelope-sender ) by mail4.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 7 Apr 2004 16:40:45 -0000 Date: Wed, 7 Apr 2004 09:40:44 -0700 (PDT) To: caml-list@inria.fr Subject: Re: [Caml-list] Function forward declaration? In-Reply-To: <1081323092.20354.8.camel@qrnik> Message-ID: References: <60532B15DF92FD4693AA89B2F7E01D8F013F29EC@tmex02> <00cf01c41bd6$391b53a0$0203a8c0@hoedic> <20040406175320.GA19840@redhat.com> <1081279717.16531.6.camel@qrnik> <002901c41c65$b53e4c50$19b0e152@warp> <1081323092.20354.8.camel@qrnik> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-2 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Miltered: at nez-perce by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; brogoff:01 caml-list:01 marcin:01 'qrczak':01 kowalczyk:01 cannasse:01 val:01 recursion:01 recursion:01 dandy:01 ocaml's:01 allowable:01 caml-list:01 ocaml:01 caml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 95 On Wed, 7 Apr 2004, Marcin 'Qrczak' Kowalczyk wrote: > W li=B6cie z =B6ro, 07-04-2004, godz. 08:01 +0200, Nicolas Cannasse napis= a=B3: > > > > val g : unit -> int > > > let f () =3D g () > > > let x =3D f () > > > let y =3D x + 1 > > > let g () =3D y > > > > What about "compilation error : recursive calls in forward declaration"= ? > > At which point? What are the correctness criteria in general? > > For forward declarations to be useful, they would need to give something > more than let rec. Cross module recursion would be enough for me. As a way to provide explicit typing so that OCaml has good support for polymorphic recursion, would be j= ust dandy too. As I'm sure you know, your example fails if translation into let rec form o= n account of OCaml's restrictions on allowable recursive values. BTW, the old mail I mentioned is here =09http://caml.inria.fr/caml-list/1059.html and the context is polymorphic recursion. -- Brian ------------------- 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