From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p4GDl5Cr010705 for ; Mon, 16 May 2011 15:47:05 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuQBAFIp0U1KfVI0kGdsb2JhbACmDQgUAQEBAQkJDQcUBCGIcKF4jBqCNYRXN4hiAQEDBoYTBJARhC+BEYVFO4M3 X-IronPort-AV: E=Sophos;i="4.64,374,1301868000"; d="scan'208";a="108694958" Received: from mail-ww0-f52.google.com ([74.125.82.52]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 16 May 2011 15:46:58 +0200 Received: by wwb31 with SMTP id 31so6024102wwb.9 for ; Mon, 16 May 2011 06:46:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to:x-mailer; bh=p/4GBjvosTY3a5XbkGrb9Mp9ImnEEQcAij7zr/sw1eE=; b=YMOBg0V8ez2KvSPtRXTfO7WVzk93xWwBRsqKcIuUkocIQGmon8UQ3GbWHhm4Ju0fP+ f4WihcnQw6fib1Or62wk8wEJTvOGJGG/7M4BIehOALg02Rmf8CEmBv6klHKK3yH/tEH7 w+IG6HNS6Jt0IOT89dIr2OUGZqjJEzEpjjrAY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=RcdBbMkrznXhl4v7KlhCSfvjxiQDsgS8cMMTcF9kvBfWb4wWeroRoRm1Klir0mrOKL i0qQAtD6hP7aak9oLoX+BsvvuWjurUdexG3uwBCuQPN4oOA4XI5yltbeZv8086hRZbEP ykCKw5oge5yfr2DWwEXfsl/p+UcGbOVHVU9rI= Received: by 10.216.79.10 with SMTP id h10mr913293wee.20.1305553569430; Mon, 16 May 2011 06:46:09 -0700 (PDT) Received: from [10.0.1.31] ([87.54.60.37]) by mx.google.com with ESMTPS id c43sm2571211weo.42.2011.05.16.06.46.06 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 16 May 2011 06:46:07 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Joel Reymont In-Reply-To: Date: Mon, 16 May 2011 15:46:05 +0200 Cc: Goswin von Brederlow , caml-list Message-Id: References: <87wrhr9n88.fsf@frosties.localnet> <522E096A-D3D5-466A-A445-AC5932F7B68F@gmail.com> To: Gabriel Scherer X-Mailer: Apple Mail (2.1084) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p4GDl5Cr010705 Subject: Re: [Caml-list] do i need a private row type? Gabriel, On May 16, 2011, at 3:39 PM, Gabriel Scherer wrote: > A solution to this problem would be to tag each item with its provenance type, so that you can regain fine-grained types dynamically : > > type any_poll = > | Pair of pair poll > | Sub of sub poll > | ... I do agree with you on the losing of types. I cannot have a pair poll, sub poll, etc. because poll takes in the array of 'any socket' types. I wonder if the right solution here is -not- to return the socket from the call to poll but just return the flags. You can then get hold of the socket itself in the original poll set and that socket would have the original type information. -------------------------------------------------------------------------- - for hire: mac osx device driver ninja, kernel extensions and usb drivers ---------------------+------------+--------------------------------------- http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont ---------------------+------------+---------------------------------------