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 QAA17151; Tue, 23 Dec 2003 16:49:35 +0100 (MET) 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 QAA17136 for ; Tue, 23 Dec 2003 16:49:34 +0100 (MET) Received: from mk-smarthost-3.mail.uk.tiscali.com (mk-smarthost-3.mail.uk.tiscali.com [212.74.114.39]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hBNFnXv23794 for ; Tue, 23 Dec 2003 16:49:33 +0100 (MET) Received: from [212.74.114.4] (helo=mk-cpfrontend.uk.tiscali.com) by mk-smarthost-3.mail.uk.tiscali.com with esmtp (Exim 4.24) id 1AYomq-000Pgw-9B for caml-list@inria.fr; Tue, 23 Dec 2003 15:49:32 +0000 Received: from [141.228.156.225] by mk-cpfrontend.uk.tiscali.com with HTTP; Tue, 23 Dec 2003 15:49:31 +0000 Date: Tue, 23 Dec 2003 15:49:31 +0000 Message-ID: <3FB8EA9C00092F61@mk-cpfrontend-2.mail.uk.tiscali.com> From: ronniec95@lineone.net Subject: [Caml-list] type equality help (camlidl related but not directly) To: caml-list@inria.fr MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Loop: caml-list@inria.fr X-Spam: no; 0.00; ronniec:01 lineone:01 mli:01 enum:01 foo:01 foo:01 ocaml:01 camlidl:01 camlidl:01 equality:01 syntax:02 string:03 string:03 data:03 let:04 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Camlidl generates the following mli (sample here) type union_9 =3D | NUMERIC | STRING | TBOOL | ENUM_DATA | CONTROL | ENCRYPT and msg_type =3D union_9 let foo x : msg_type option =3D x If I try to do # foo STRING;; Characters 4-10: foo STRING;; ^^^^^^ This expression has type union_9 but is here used with type msg_type opti= on How can I either get camlidl to not do this, or what is the syntax in Oca= ml to ensure I use the right type? Thanks, Ronnie ------------------- 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