From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id AAA28632 for caml-redistribution; Sun, 24 May 1998 00:18:49 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA28218 for ; Sat, 23 May 1998 18:34:39 +0200 (MET DST) Received: from imag.imag.fr (imag.imag.fr [129.88.30.1]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id SAA26230 for ; Sat, 23 May 1998 18:34:35 +0200 (MET DST) Received: from alphand.imag.fr (alphand.imag.fr [129.88.103.10]) by imag.imag.fr (8.8.5/8.8.5) with ESMTP id SAA27362 for ; Sat, 23 May 1998 18:34:32 +0200 (MET DST) Received: from imag.fr (merle.imag.fr [129.88.103.23]) by alphand.imag.fr (8.6.10/8.6.9) with ESMTP id SAA32794 for ; Sat, 23 May 1998 18:34:09 +0200 Sender: weis Message-ID: <3566FA06.8BADB25D@imag.fr> Date: Sat, 23 May 1998 18:32:06 +0200 From: Jean-Marie Favre Organization: IMAG, Laboratoire LSR, University Joseph Fourier X-Mailer: Mozilla 4.03 [en] (X11; I; AIX 4.1) MIME-Version: 1.0 To: caml-list@inria.fr Subject: polymorphic printer functions ? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello everybody ... I'd like to know how to implement polymorphic printer functions. (I use ocaml 1.07) I'm writing a library implementing a large subset of the Z library operators (operations on sets, relations, functions, and so on) and i would like to be able to install printer functions for printing 'a set, ('a,'b) relations, etc., (using #install_printer). set, relations being abstract types constructors. Writing a polymorphic printer for such structures means to be able to call a function printing each element. Is there any function like print_value : 'a -> unit available when using the top level ? Jean-marie