From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p4J7XBiP030999 for ; Thu, 19 May 2011 09:33:11 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoICAF/G1E1KfVI0kGdsb2JhbACmDAgUAQEBAQkJDQcUBCGIcKJljBqCNYRvN4hiAQEDBoYTBJARhC+BEYVFO4M3 X-IronPort-AV: E=Sophos;i="4.65,236,1304287200"; d="scan'208";a="94978295" Received: from mail-ww0-f52.google.com ([74.125.82.52]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 19 May 2011 09:33:05 +0200 Received: by wwb31 with SMTP id 31so3078993wwb.9 for ; Thu, 19 May 2011 00:33:05 -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=C+I3ptyLXspZJ8LImsdP08snGmWZXrSXGQE/x9Qm+/8=; b=tIKmWjXcXg0L7bOU2Llg0qaVDRFh9bPUzc52u57IGkHK3waVYqvowCXG3sVrPwDJGc ReSxrIvkz9MDlh+71cnVUbGVP0DnB7Xuq/BYlCJqcBa8plIDj0M3a1CceJnhb/hfpjFa U8q90YRTR20wzs5RPqIcbRxEKeXlC7X6BPhsY= 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=QIZ79gr9QyZvkg3xHIL63CwoaXpBZOWktEv4twc+R2Rx1HFTpnqq68lEMQJMaHBLvj QxUBot3jMdUwlk76JzQPmtXl4PW7JsIPChdPSgDgCn+N68mreiD+XVTvQLoYiSoLvGmd QfUQ/mIakpTQRTbWXMOyKVxuQtvAac0n4QL6U= Received: by 10.227.55.20 with SMTP id s20mr2811357wbg.15.1305790385183; Thu, 19 May 2011 00:33:05 -0700 (PDT) Received: from [10.0.1.97] ([87.54.60.37]) by mx.google.com with ESMTPS id bd8sm1420894wbb.65.2011.05.19.00.33.03 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 19 May 2011 00:33:04 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Joel Reymont In-Reply-To: Date: Thu, 19 May 2011 09:33:01 +0200 Cc: caml-list Message-Id: <374F68E6-6CD0-4221-A9A1-9A02AB4362DF@gmail.com> References: To: Pedro Borges X-Mailer: Apple Mail (2.1084) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p4J7XBiP030999 Subject: Re: [Caml-list] do i need a private row type? On May 19, 2011, at 6:15 AM, Pedro Borges wrote: > the current version is a bit ahead of your version I think. Maybe, maybe not :-). > you can cast any socket type to (generic Socket.t) so you can have > different socket types inside the poll. I don't need to cast in my new phantom types version, I can just stick the various sockets into the poll mask, regardless of type. There's no type loss information either because I don't return sockets, I return flags, e.g. module Poll : sig type t type poll_event = In | Out | In_out type poll_socket = [`Pair|`Pub|`Sub|`Req|`Rep|`Dealer|`Router|`Pull|`Push] Socket.t type poll_mask = (poll_socket * poll_event) val mask_of : poll_mask array -> t val poll : ?timeout: int -> t -> poll_event option array end This also does not rely on OCaml figuring out that the socket I returned is the same as the socket I put in. I know that the returned flags in position N apply to the socket in the same position in the poll mask. > This weekend I'm going to look at the bindings again. They need a serious fix. I have fixed the bindings enough for our ad serving use. Please take a look at the batch of commits in your pull queue on Github. -------------------------------------------------------------------------- - for hire: mac osx device driver ninja, kernel extensions and usb drivers ---------------------+------------+--------------------------------------- http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont ---------------------+------------+---------------------------------------