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 NAA16427; Wed, 10 Apr 2002 13:03:21 +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 NAA19988 for ; Wed, 10 Apr 2002 13:03:20 +0200 (MET DST) Received: from verdot.inria.fr (verdot.inria.fr [128.93.11.7]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g3AB3JP18093 for ; Wed, 10 Apr 2002 13:03:19 +0200 (MET DST) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id NAA05473 for caml-list@inria.fr; Wed, 10 Apr 2002 13:03:14 +0200 Date: Wed, 10 Apr 2002 13:03:14 +0200 From: Daniel de Rauglaudre To: caml-list@inria.fr Subject: Re: [Caml-list] Streams Message-ID: <20020410130314.I20228@verdot.inria.fr> References: <200204091809.g39I9TV03521@demokrit.cas.mcmaster.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200204091809.g39I9TV03521@demokrit.cas.mcmaster.ca>; from kahl@cas.mcmaster.ca on Tue, Apr 09, 2002 at 02:09:29PM -0400 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, > let pc0 c = parser n > [< ' x > when x == c > ?? (string_of_int n ^ ": pc '" ^ String.make 1 c ^ "'") > >] -> ();; The "??" is unuseful for the first element of a stream pattern, because when it fails, it raises Stream.Failure, not Stream.Error. The "??" introduces a parameter for Stream.Error. Your code is equivalent to: let pc0 c = parser n [< ' x when x == c >] -> ();; It was an error that the OCaml version accepted the "??" for the first element. -- 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 Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners