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 RAA18326; Tue, 23 Dec 2003 17:12:43 +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 RAA18460 for ; Tue, 23 Dec 2003 17:12:42 +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 hBNGCgv25960 for ; Tue, 23 Dec 2003 17:12:42 +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 1AYp9E-0003fD-Ro for caml-list@inria.fr; Tue, 23 Dec 2003 16:12:40 +0000 Received: from [141.228.156.225] by mk-cpfrontend.uk.tiscali.com with HTTP; Tue, 23 Dec 2003 16:12:41 +0000 Date: Tue, 23 Dec 2003 16:12:41 +0000 Message-ID: <3FB8EA9C0009309C@mk-cpfrontend-2.mail.uk.tiscali.com> In-Reply-To: <87fzfbjzi3.fsf@linux-france.org> From: ronniec95@lineone.net Subject: Re: [Caml-list] type equality help - Thanks to all 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 caml-list:01 ronniec:01 lineone:01 caml-list:01 dmentre:01 enum:01 foo:01 foo:01 dmentre:01 bug:01 faq:01 faq:01 beginner's:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk That made sense. I guess not quite clear from docs. I should be able to progress a lot further on my project. thanks very muc= h for the responses. Ronnie >-- Original Message -- >To: ronniec95@lineone.net >Cc: caml-list@inria.fr >Subject: Re: [Caml-list] type equality help (camlidl related but not > directly) >From: David MENTRE >Date: Tue, 23 Dec 2003 17:00:04 +0100 > > >Hello, ronniec95@lineone.net writes: > 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 ^^^^^^Here is t >e trick > 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 op= tion You should do : # foo (Some STRING);; - : msg_type option =3D Som > STRING foo is defined as an option (| None | Some of 'a) over msg_type. Yours, d. -- David Mentr=E9 http://www.linux-france.org/~dmentre/david-mentre-public-key.asc GnuPG key fingerprint: A7CD 7357 3EC4 1163 7 >5B 7FD3 FB3E AD7C 2A18 BE9E ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inr= ia.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr= /FAQ/ Beginner's list: http://groups.yahoo.co >/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