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 TAA11413; Tue, 22 May 2001 19:12:53 +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 TAA11439 for ; Tue, 22 May 2001 19:12:52 +0200 (MET DST) Received: from www.invert.com (invert.com [209.164.21.15]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f4MHCnH09536 for ; Tue, 22 May 2001 19:12:49 +0200 (MET DST) Received: (from miles@localhost) by www.invert.com (8.10.1/8.10.1AA) id f4MHCmg98003 for caml-list@inria.fr; Tue, 22 May 2001 10:12:48 -0700 (PDT) (envelope-from miles) Date: Tue, 22 May 2001 10:12:48 -0700 From: Miles Egan To: caml-list@inria.fr Subject: Re: [Caml-list] lisp -> ocaml Message-ID: <20010522101248.A97732@caddr.com> References: <20010522093341.A97425@caddr.com> <877kz9kznu.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: <877kz9kznu.dlv@wanadoo.fr>; from vanicat@labri.u-bordeaux.fr on Tue, May 22, 2001 at 08:27:01PM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, May 22, 2001 at 08:27:01PM +0200, Remi VANICAT wrote: > the > let rec ... = .. > and ... = ... > and ... = ... > > make the trick Great. This is easy enough. Thanks (and thanks to Markus). > no you haven't, the function compare is a very good ordering for > variant: > > # compare `Aze `Azr ;; > - : int = -1 > # compare (Some 0) None;; > - : int = 1 > # type response = Yes | No;; > type response = Yes | No > # compare Yes No;; > - : int = -1 I wasn't aware of this function, but it's exactly what I need. Thanks again. > yes this a problem. but often there is better way to print thing than > just the name of the variant. > > You can also use camlp4 to make a construct who build the variant and > the printer at the same time. I haven't had a chance to familiarize myself with camlp4 yet. I guess I should. -- miles ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr