Version française
Home     About     Download     Resources     Contact us    
Browse thread
beginner question: DAGs w/ recursive types an encapsulation of a Map
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] beginner question: DAGs w/ recursive types an encapsulation of a Map
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 <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net