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 LAA23695; Tue, 17 Sep 2002 11:52:02 +0200 (MET DST) 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 LAA23477 for ; Tue, 17 Sep 2002 11:52:01 +0200 (MET DST) Received: from serveur5.labri.fr (serveur5.labri.fr [147.210.9.207]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g8H9q0125928 for ; Tue, 17 Sep 2002 11:52:00 +0200 (MET DST) Received: (from vanicat@localhost) by serveur5.labri.fr (8.11.6/8.11.6) id g8H9q0S11339; Tue, 17 Sep 2002 11:52:00 +0200 X-Authentication-Warning: serveur5.labri.fr: vanicat set sender to vanicat@labri.u-bordeaux.fr using -f To: caml-list@inria.fr Subject: Re: [Caml-list] 1) "open" in modules, 2) buffer enhancement. References: From: Remi VANICAT In-Reply-To: Date: 17 Sep 2002 11:52:00 +0200 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk dmitry grebeniuk writes: > hi > > 1) > When I'm trying to compile such file: > ============================================= > module M = > struct > let open () = print_string "open called\n" > > end;; > > M.open ();; > ============================================= > I get errors like > > File "somefile.ml", line 3, characters 6-10: > Syntax error > > It is the location of "open" function. I think it's a parser's bug - am > I right? No, you aren't : open is a reserved word in ocaml, you can't use it as a name for something else. > 2) > I have modified standart buffer.ml and buffer.mli - I've added > functions "get_line" (gets next line from buffer or raises Not_found > if there's no line) and "get_block" (gets specified number of characters > to pre-allocated string). I think these functions will be useful not only > for me - can you add them (or their analogs) to standart distribution as > Buffer's modification or as some new module (Fifobuff, for example)? You should submit a feature wish bug with a patch to caml-bugs@inria.fr -- Rémi Vanicat vanicat@labri.u-bordeaux.fr http://dept-info.labri.u-bordeaux.fr/~vanicat ------------------- 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