From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id NAA20599 for caml-redistribution; Thu, 29 Feb 1996 13:39:15 +0100 Received: (from mauny@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id TAA07199; Wed, 28 Feb 1996 19:36:42 +0100 Message-Id: <199602281836.TAA07199@pauillac.inria.fr> Subject: Re: stream To: Choun-tong.Lieu@litp.ibp.fr (Choun-Tong LIEU) Date: Wed, 28 Feb 1996 19:36:42 +0100 (MET) Cc: caml-list@pauillac.inria.fr In-Reply-To: <199602280938.KAA02520@cadillac.ibp.fr> from "Choun-Tong LIEU" at Feb 28, 96 10:38:10 am From: Michel.Mauny@inria.fr (Michel Mauny) Reply-to: Michel.Mauny@inria.fr Organization: INRIA, BP 105, F-78153 Le Chesnay Cedex, France Phone: (+33) 1 39 63 57 96 -- Fax: (+33) 1 39 63 53 30 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: weis Bonjour, > J'ai une conversation "bizarre" avec caml-light a propos des > stream. J'ai essaye de fouiller dans les docs, je n'ai pas trouve de > reponse. > > Est ce que caml-light privilegie le dernier element non > terminal des stream ? > [...] > #pr toto;; > 123- : unit = () (***** Je comprends un peu moins ou pas du tout. Remarquons tata est a la fin > de [< toto; tata >] > *****) C'est un comportement décrit dans la liste des bugs connus de Caml-Light 0.7. Vous vous attendiez à juste titre à ce que "tata" soit vidé par le parcours de [< toto; tata >]. Vous trouverez ci-dessous un extrait du fichier KNOWN-BUGS de la distribution 0.7, qui indique notamment comment contourner ce bug. Cordialement, -- Michel Mauny --------------------------------------------------------------------------- The following problems have not been fixed at the time of this release: 1- Stream concatenation using [< ... >] does not always preserve the sharing among streams, and sometimes duplicate stream subcomponents. For instance, if you define s' = [< '1; s >] and then read alternatively from s' and from s, a given element of s can be read twice. The problem occurs only if s is in tail position inside s'. To guarantee proper sharing, move s in non-tail position, e.g. take s' = [< '1; s; [<>] >]. ---------------------------------------------------------------------------