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 PAA23183; Mon, 28 May 2001 15:43:52 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA23006 for ; Mon, 28 May 2001 15:43:51 +0200 (MET DST) Received: from verdot.inria.fr (verdot.inria.fr [128.93.11.7]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f4SDhoj11161 for ; Mon, 28 May 2001 15:43:50 +0200 (MET DST) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id PAA21256 for caml-list@inria.fr; Mon, 28 May 2001 15:43:50 +0200 Date: Mon, 28 May 2001 15:43:50 +0200 From: Daniel de Rauglaudre To: caml-list@inria.fr Subject: Re: [Caml-list] Lazy.Value Message-ID: <20010528154350.I13297@verdot.inria.fr> References: <20010528144620.G13297@verdot.inria.fr> <20010528145313.F19801@pauillac.inria.fr> <20010528150725.H13297@verdot.inria.fr> <20010528151601.B21783@pauillac.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0us In-Reply-To: <20010528151601.B21783@pauillac.inria.fr>; from Xavier.Leroy@inria.fr on Mon, May 28, 2001 at 03:16:01PM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > OK, I see what you mean. If "lazy e" had a special typing rule and a > special compilation rule -- instead of being expanded into > "ref (Lazy.Delayed (fun () -> e))" during parsing -- then it would be > safe to treat it as generalizable, indeed. Right. In the present implementation of stream.ml, streams are not mutable and are "muted" by Obj.set_field. It is hack to allow the empty stream to be an 'a stream. I thought that it could not create problems, since it is hidden in the implementation. But it created a problem (somebody sent me a bug report a long time ago), due to an optimization in the compiler. I would like to remove my hack but the consequence is that the empty stream would not be general. This is for the moment accepted: let s = [< >] in [< '1; s >], [< 'true; s >];; If I program "clean" streams, this would be rejected, except if lazies can be typed like you say. - I don't know if this lazy would be useful in other circumstances. It is the only case I know. - Or we could accept a new version of not-generalized clean streams, but I don't know if it would be a problem for people using streams. It is a problem to restrict things from a version to another, since according to Murphy's law, there are always people for whom the old version was absolutely essential. But perhaps not. -- Daniel de RAUGLAUDRE daniel.de_rauglaudre@inria.fr http://cristal.inria.fr/~ddr/ ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr