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 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 14656BC69 for ; Sun, 6 May 2007 10:05:31 +0200 (CEST) Received: from ipmail01.adl2.internode.on.net (ipmail01.adl2.internode.on.net [203.16.214.140]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4685T2Y024439 for ; Sun, 6 May 2007 10:05:30 +0200 X-IronPort-AV: E=Sophos;i="4.14,498,1170595800"; d="scan'208";a="123869197" Received: from ppp8-148.lns1.syd7.internode.on.net (HELO [192.168.1.201]) ([59.167.8.148]) by ipmail01.adl2.internode.on.net with ESMTP; 06 May 2007 17:35:27 +0930 Subject: Re: [Caml-list] beginner question: DAGs w/ recursive types an encapsulation of a Map From: skaller To: Alain Frisch Cc: Jon Harrop , caml-list@yquem.inria.fr In-Reply-To: <463D89B5.5060309@inria.fr> References: <20070505025954.71b5a5b5@kerneis.info> <1ffe809c0705052033p6079116fq2a30f5dd942789aa@mail.gmail.com> <200705060439.41842.jon@ffconsultancy.com> <463D89B5.5060309@inria.fr> Content-Type: text/plain Date: Sun, 06 May 2007 18:05:20 +1000 Message-Id: <1178438720.1677.9.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 463D8C49.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; recursive:01 0200,:01 frisch:01 -rectypes:01 recursive:01 type-checker:01 ill-formed:01 run-time:01 sourceforge:01 garbage:01 garbage:01 wrote:01 wrote:01 rec:01 rec:01 On Sun, 2007-05-06 at 09:54 +0200, Alain Frisch wrote: > Jon Harrop wrote: > << Note: if the program is compiled with the -rectypes option, > ill-founded recursive definitions of the form let rec x = lazy x or let > rec x = lazy(lazy(...(lazy x))) are accepted by the type-checker and > lead, when forced, to ill-formed values that trigger infinite loops in > the garbage collector and other parts of the run-time system. I'm curious how this can happen to the garbage collector? Recursive routines that don't maintain a visitation trace I can understand failing .. but surely the GC has to deal with cycles anyhow.. I mean the whole *point* of a garbage collector is to deal with cyclic data .. :) -- John Skaller Felix, successor to C++: http://felix.sf.net