caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] 1) "open" in modules, 2) buffer enhancement.
@ 2002-09-17  9:32 dmitry grebeniuk
  2002-09-17  9:52 ` Remi VANICAT
  0 siblings, 1 reply; 2+ messages in thread
From: dmitry grebeniuk @ 2002-09-17  9:32 UTC (permalink / raw)
  To: caml-list

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?  Will it be fixed in next OCaml releases?


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)?


bye

-------------------
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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] 1) "open" in modules, 2) buffer enhancement.
  2002-09-17  9:32 [Caml-list] 1) "open" in modules, 2) buffer enhancement dmitry grebeniuk
@ 2002-09-17  9:52 ` Remi VANICAT
  0 siblings, 0 replies; 2+ messages in thread
From: Remi VANICAT @ 2002-09-17  9:52 UTC (permalink / raw)
  To: caml-list

dmitry grebeniuk <gds@vestra.bendery.md> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-17  9:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-17  9:32 [Caml-list] 1) "open" in modules, 2) buffer enhancement dmitry grebeniuk
2002-09-17  9:52 ` Remi VANICAT

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).