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 QAA28942; Fri, 12 Jul 2002 16:19:32 +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 QAA28936 for ; Fri, 12 Jul 2002 16:19:31 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g6CEIwf04899; Fri, 12 Jul 2002 16:18:58 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA28931; Fri, 12 Jul 2002 16:18:58 +0200 (MET DST) Date: Fri, 12 Jul 2002 16:18:58 +0200 From: Xavier Leroy To: dmitry grebeniuk Cc: caml-list@inria.fr Subject: Re: [Caml-list] custom channels Message-ID: <20020712161858.A28760@pauillac.inria.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from gds@vestra.bendery.md on Wed, Jul 10, 2002 at 10:26:58AM +0300 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > 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