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 DAA32667; Sun, 29 Aug 2004 03:21:58 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 DAA32189 for ; Sun, 29 Aug 2004 03:21:57 +0200 (MET DST) Received: from hosting.commandprompt.com (128.commandprompt.com [207.173.200.128]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i7T1LuRU030995 for ; Sun, 29 Aug 2004 03:21:56 +0200 Received: from hosting.commandprompt.com (168-103-168-94.tukw.qwest.net [168.103.168.94]) (authenticated) by hosting.commandprompt.com (8.11.6/8.11.6) with ESMTP id i7T1Lsh29010 for ; Sat, 28 Aug 2004 18:21:54 -0700 Received: by hosting.commandprompt.com (sSMTP sendmail emulation); Sat, 28 Aug 2004 18:26:55 -0700 Date: Sat, 28 Aug 2004 18:26:55 -0700 From: Jeff Henrikson To: caml-list@inria.fr Subject: [Caml-list] toplevel printing of polymorphic values Message-ID: <20040829012654.GA3011@respighi.local.> Mail-Followup-To: caml-list@inria.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-OS: Darwin respighi.local. 6.0 Power Macintosh X-Miltered: at nez-perce with ID 41312FB4.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; henrikson:01 jehenrik:01 generic:01 implemented:01 genprintval:01 henrikson:01 ocaml:01 toplevel:01 toplevel:01 polymorphic:01 module:03 module:03 obj:03 let:04 seems:05 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk -- Hello, I have written a double ended queue and I would like to install a pretty printer in the toplevel. Just being able to print an 'a Dequeue.t like an 'a list would be fine. I understand how to use the Format module to get the box, print the delimeters, etc. The part I don't understand is how to get back to the generic 'a printer. I cannot see any polypmorphic methods in all of the Format module. What I want to access seems to be implemented in: ocaml_source/toplevel/genprintval.ml: (* The main printing function *) let outval_of_value max_steps max_depth check_depth env obj ty = Though if it is exposed, I'm sure it is in some other form. Is what I'm trying to do possible? Jeff Henrikson ------------------- 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