caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] custom channels
@ 2002-07-10  7:26 dmitry grebeniuk
  2002-07-11  3:07 ` Alexander V. Voinov
  2002-07-12 14:18 ` Xavier Leroy
  0 siblings, 2 replies; 3+ messages in thread
From: dmitry grebeniuk @ 2002-07-10  7:26 UTC (permalink / raw)
  To: caml-list

Hello.

  I want to ask Caml developers about one feature...
  Can you officially describe (in the next OCaml package,
for example) the creating of channels with custom
input/output/..etc.. functions?  (C or Caml interface -
it doesn't matter)
  It is very useful since many OCaml 'standart' functions
work with channels, and I don't want to write my own code
instead of these functions.
  Of course, I can dig in the source code and find the
channel definitions, but _documented_ channel-creating
interface will be helpful not only for me.

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] 3+ messages in thread

* Re: [Caml-list] custom channels
  2002-07-10  7:26 [Caml-list] custom channels dmitry grebeniuk
@ 2002-07-11  3:07 ` Alexander V. Voinov
  2002-07-12 14:18 ` Xavier Leroy
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander V. Voinov @ 2002-07-11  3:07 UTC (permalink / raw)
  To: dmitry grebeniuk, caml-list

Hi 

dmitry grebeniuk wrote:
>   Of course, I can dig in the source code and find the
> channel definitions, but _documented_ channel-creating
> interface will be helpful not only for me.

I agree. I just didn't get to it yet but thought it would have been
useful.

Alexander
-------------------
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] 3+ messages in thread

* Re: [Caml-list] custom channels
  2002-07-10  7:26 [Caml-list] custom channels dmitry grebeniuk
  2002-07-11  3:07 ` Alexander V. Voinov
@ 2002-07-12 14:18 ` Xavier Leroy
  1 sibling, 0 replies; 3+ messages in thread
From: Xavier Leroy @ 2002-07-12 14:18 UTC (permalink / raw)
  To: dmitry grebeniuk; +Cc: caml-list

>   I want to ask Caml developers about one feature...
>   Can you officially describe (in the next OCaml package,
> for example) the creating of channels with custom
> input/output/..etc.. functions?  (C or Caml interface -
> it doesn't matter)

If you want your channels to have type in_channel or out_channel, and
be usable with the I/O functions provided by the standard library,
then this is not possible with the current implementation.

However, it is easy to define your own types my_in_channel, my_out_channel
that wrap the system channel types, as well as your own channels, and
provide operations that dispatch on the channel kind, either using
variant types, records of functions, or objects.

- Xavier Leroy
-------------------
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] 3+ messages in thread

end of thread, other threads:[~2002-07-12 14:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-10  7:26 [Caml-list] custom channels dmitry grebeniuk
2002-07-11  3:07 ` Alexander V. Voinov
2002-07-12 14:18 ` Xavier Leroy

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