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 KAA00053; Wed, 18 Jun 2003 10:05:21 +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 KAA32695 for ; Wed, 18 Jun 2003 10:05:20 +0200 (MET DST) Received: from host3.tech.netcracker.com ([212.119.253.3]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h5I85IH05479 for ; Wed, 18 Jun 2003 10:05:19 +0200 (MET DST) Received: from ramodinov (h167 [212.119.253.167]) by host3.tech.netcracker.com (8.9.3+Sun/8.9.1) with ESMTP id MAA27419; Wed, 18 Jun 2003 12:11:52 +0400 (MSD) From: "Alex Romadinoff" To: "'Ye Wu'" , Subject: RE: [Caml-list] variant type Date: Wed, 18 Jun 2003 12:12:10 +0400 Message-ID: <003a01c33571$52dfa170$a7fd77d4@ramodinov> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 In-Reply-To: <3EEF57F7.7020705@cs.stevens-tech.edu> Importance: Normal X-Spam: no; 0.00; caml-list:01 3.14:01 bug:01 faq:01 beginner's:01 beginners:01 bin:01 caml-bugs:01 ocaml:01 caml:01 alex:01 int:01 groups:01 variant:02 match:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi Just think what is the type of your function? shape -> int or shape -> float ???? Regards, Alex -----Original Message----- From: owner-caml-list@pauillac.inria.fr [mailto:owner-caml-list@pauillac.inria.fr] On Behalf Of Ye Wu Sent: Tuesday, June 17, 2003 10:04 PM To: caml-list@inria.fr Subject: [Caml-list] variant type Could you please tell me why the following doesn't work? type shape = Square of int * int * int |Circle of float * float * float;; let area s = match s with Square (_, _, d) -> d * d |Circle (_, _, r) -> 3.14 *. r *. r;; Regards, Ye ------------------- 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 ------------------- 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