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 UAA03475; Sun, 4 Nov 2001 20:06:38 +0100 (MET) 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 UAA02529 for ; Sun, 4 Nov 2001 20:06:36 +0100 (MET) 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 fA4J6aj04272 for ; Sun, 4 Nov 2001 20:06:36 +0100 (MET) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id UAA02789 for caml-list@inria.fr; Sun, 4 Nov 2001 20:06:36 +0100 Date: Sun, 4 Nov 2001 20:06:36 +0100 From: Daniel de Rauglaudre To: caml-list@inria.fr Subject: Re: [Caml-list] mixing fast and [<>] stream: illegal? Message-ID: <20011104200636.T25844@verdot.inria.fr> References: <20011104185952.A5548@cs.unibo.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011104185952.A5548@cs.unibo.it>; from zack@cs.unibo.it on Sun, Nov 04, 2001 at 06:59:52PM +0100 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, On Sun, Nov 04, 2001 at 06:59:52PM +0100, Stefano Zacchiroli wrote: > Seems to me that no illegal action was performed ... > Am I wrong? > Is really dangerous mixing the two streams? The doc meant "streams expressions built with [< >]", not parsers. The [< >] in parsers are stream patterns, not stream expressions. Your code is ok. What does not work are things like [< '1; Stream.from gen; '2 >]. It is not dangerous, it will just fail: # let gen i = Some i;; val gen : 'a -> 'a option = # let s = [< '1; Stream.from gen; '2 >];; val s : int Stream.t = # Stream.next s;; - : int = 1 # Stream.next s;; Uncaught exception: Failure "illegal stream concatenation". -- Daniel de RAUGLAUDRE daniel.de_rauglaudre@inria.fr http://cristal.inria.fr/~ddr/ ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr