caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <xavier.leroy@inria.fr>
To: dmitry grebeniuk <gds@vestra.bendery.md>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] custom channels
Date: Fri, 12 Jul 2002 16:18:58 +0200	[thread overview]
Message-ID: <20020712161858.A28760@pauillac.inria.fr> (raw)
In-Reply-To: <Pine.LNX.4.21.0207100933130.26456-100000@vestra.bendery.md>; from gds@vestra.bendery.md on Wed, Jul 10, 2002 at 10:26:58AM +0300

>   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


      parent reply	other threads:[~2002-07-12 14:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-10  7:26 dmitry grebeniuk
2002-07-11  3:07 ` Alexander V. Voinov
2002-07-12 14:18 ` Xavier Leroy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020712161858.A28760@pauillac.inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=gds@vestra.bendery.md \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).