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 EAA12884; Wed, 13 Jun 2001 04:21:30 +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 EAA13450 for ; Wed, 13 Jun 2001 04:21:29 +0200 (MET DST) Received: from ip208.usw4.rb1.pdx.nwlink.com (ip208.usw4.rb1.pdx.nwlink.com [209.20.133.208]) by nez-perce.inria.fr (8.11.1/8.10.0) with SMTP id f5D2LSb25723 for ; Wed, 13 Jun 2001 04:21:28 +0200 (MET DST) Received: (qmail 24501 invoked by uid 500); 13 Jun 2001 02:21:26 -0000 Date: Tue, 12 Jun 2001 19:21:26 -0700 From: leary@nwlink.com To: caml Subject: [Caml-list] enums in OCaml? Message-ID: <20010612192126.B24440@jean> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk What's the right way to make something like C's enums in OCaml. I found a couple references to sum types online and in the manual and caml light tutorial, but none of it was really what I'm looking for: alias a number with a name, hopefully conveniently. Should I just make some named variables? That seems a bit verbose and un-clever. ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr