From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by margaux.inria.fr, Fri, 23 Apr 93 14:04:32 +0200 Received: from [192.93.2.5] by margaux.inria.fr, Wed, 21 Apr 93 20:15:20 +0200 Received: from lri.lri.fr by corton.inria.fr (5.65c8d/92.02.29) via Fnet-EUnet id AA21440; Wed, 21 Apr 1993 19:20:24 +0200 (MET) Received: from sun7d.lri.fr by lri.lri.fr, Wed, 21 Apr 1993 19:13:59 +0200 Received: by sun7d.lri.fr, Wed, 21 Apr 93 19:13:58 +0200 From: michel@lri.fr Message-Id: <9304211713.AA02411@sun7d.lri.fr> Subject: Defining own types printers. To: caml-light@margaux (Caml Light Mailing list) Date: Wed, 21 Apr 1993 19:13:57 +0200 (MET DST) X-Mailer: ELM [version 2.4 PL21] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: weis@margaux Hi, I have some user-defined types , and I'd like to have them printed the ritgh way under caml-ligth when I just want to see the contents of a var -> Ex: --- #x1;; - : t_bdd_tree = cNode {label="x1"; alors=cNode {label="x2"; alors=cNode {label="x3"; alors=cTerm false; sinon=cTerm false}; sinon=cNode {label="x3"; alors=cTerm false; sinon=cTerm true}}; sinon=cNode {label="x2"; alors=cNode {label="x3"; alors=cTerm false; sinon=cTerm true}; sinon=cNode {label="x3"; alors=cTerm false; s inon=cTerm true}}} # I'd like to see -> #print_bdd x1;; (x1, (x2, (x3, 0, 0), (x3, 0, 1)), (x2, (x3, 0, 1), (x3, 0, 1)))- : unit = () I see at the page #231 of the Caml-light ref manual, that the chapter will deal with Streams, parsers and printers but there's nothing concerning user-defined printers (like in CAML). My question is : Is it possible to attach printers to user defined types ? BTW, I wrote in english, since there might be some non-french readers reading this question. Thank you in advance. -- Olivier MICHEL Email : michel@lri.lri.fr Laboratoire LRI - Universite PARIS_SUD : michel@FRLRI61.BITNET Bat. 490- bureau 69 Fax : 33-1-64-46-19-92 91405 ORSAY CEDEX Phone : 33-1-69-41-65-79 FRANCE "if you're not programming functionally, then you must be programming dysfunctionally"