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 DAA17462; Tue, 10 Sep 2002 03:10:07 +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 DAA17092 for ; Tue, 10 Sep 2002 03:10:06 +0200 (MET DST) Received: from verdot.inria.fr (verdot.inria.fr [128.93.11.7]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g8A1A6109353 for ; Tue, 10 Sep 2002 03:10:06 +0200 (MET DST) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id DAA25654 for caml-list@inria.fr; Tue, 10 Sep 2002 03:10:06 +0200 Date: Tue, 10 Sep 2002 03:10:05 +0200 From: Daniel de Rauglaudre To: caml-list@inria.fr Subject: Re: [Caml-list] Does this function exist? Message-ID: <20020910031005.B25593@verdot.inria.fr> References: <86hegzarek.fsf@laurelin.dementia.org> <4.3.2.7.2.20020909144531.04529c20@mail.d6.com> <87y9aavkxj.dlv@wanadoo.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <87y9aavkxj.dlv@wanadoo.fr>; from vanicat@labri.u-bordeaux.fr on Tue, Sep 10, 2002 at 12:48:40AM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, Chris Hecker writes: > > type foo = A of int | B of int list > Then have camlp4 generate > let print_foo fmt f = > [...] > Is this something camlp4 can do? Camlp4 can do that, indeed, the way ioXML does, like Remi Vanicat says. With changes in ioXML, you can generate printing functions you want, for each type. -- Daniel de RAUGLAUDRE daniel.de_rauglaudre@inria.fr http://cristal.inria.fr/~ddr/ ------------------- 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