From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 3DA51BB81 for ; Wed, 11 Jan 2006 10:56:11 +0100 (CET) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.201]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k0B9uAbN005068 for ; Wed, 11 Jan 2006 10:56:10 +0100 Received: by wproxy.gmail.com with SMTP id i22so106002wra for ; Wed, 11 Jan 2006 01:56:10 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=VaiETIfv5fgt8CIs9CKYnxdbs7DSMZLMcHDfImGnGGK/T8Y8vnxfPK3EPxx6RtdoYnKBJzSbLHHX8KNygE/MWSNjep5e2DBBN160NP3kxllUImC4ADBD6BAgAAw9Z5Q3ZBPhiaZLP0whoK9xKrlURRHI/+C1FOLkFe8H1mrM9Ho= Received: by 10.65.205.8 with SMTP id h8mr133480qbq; Wed, 11 Jan 2006 01:56:10 -0800 (PST) Received: by 10.65.22.19 with HTTP; Wed, 11 Jan 2006 01:56:09 -0800 (PST) Message-ID: Date: Wed, 11 Jan 2006 22:56:09 +1300 From: Jonathan Roewen To: caml-list@yquem.inria.fr Subject: [Caml-list] Mixing variant types... MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Miltered: at nez-perce with ID 43C4D63A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 variants:01 variant:02 variant:02 tuple:02 tuple:02 hmm:02 types:02 types:02 let:03 channel:05 channel:05 uses:06 mixing:07 i'm:08 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 Hi, I'm wondering why the following doesn't work: let sources =3D (Event.receive internal_control) :: List.map (fun w -> Channel.receive w.control) !windows in where internal_control passes a (window,`New_window) event over the channel, and w.control passes values of the type (window,event), where type event =3D [ `Repaint ]. I thought that since they're both variant types, I should be able to build a list that uses both variants. Hmm, I just had a thought: is this because it's a tuple with the variant inside the tuple? Jonathan