From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p4J4FFlp025037 for ; Thu, 19 May 2011 06:15:15 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoICAOiY1E3RVda2kGdsb2JhbACXXo42CBQBAQEBCQkNBxQEIasPjBqCNYRtN4hiAQEDBoYTBJARiEuCOjuDNg X-IronPort-AV: E=Sophos;i="4.65,235,1304287200"; d="scan'208";a="99314741" Received: from mail-iw0-f182.google.com ([209.85.214.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 19 May 2011 06:15:09 +0200 Received: by iwn33 with SMTP id 33so3333694iwn.27 for ; Wed, 18 May 2011 21:15:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=1qu9Dmghm9vV2Fo+dDxYBe4fUBaHNkB/0uCxiU2csQQ=; b=mLjSKqdxlvnlAWlqKH/0Rjh2GMNw6ZoQjf0uWD443tjh55rkGWJYcv+K857Medm0Aj dis4ZZreG78B+xrrXVYHfsXOlfk39/PtYt5xbYsYFL9gTXIXBe3sv53HU+hImK8Iheb5 cX4XhLVN8EcfLHblnmjz0Br7ZcyayKcMVq+aA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=ZL4EcI4zptzkmOnvSKYQHmWWPm3OFym7OUm01AednO/RI2ReieAGW4ok/tOseVj+bj nWyTJgPheQxolNvC85dM6buqjRYBZ8x8gEZg9kq5lAlMUjtD/nAMdJknf7NyL3CC3Y4W PhG4lRim4wGxscPSwTlkB9wLtMfvKuRtMsWHI= MIME-Version: 1.0 Received: by 10.231.67.74 with SMTP id q10mr1966899ibi.25.1305778507400; Wed, 18 May 2011 21:15:07 -0700 (PDT) Received: by 10.231.203.13 with HTTP; Wed, 18 May 2011 21:15:07 -0700 (PDT) In-Reply-To: References: Date: Thu, 19 May 2011 05:15:07 +0100 Message-ID: From: Pedro Borges To: Joel Reymont Cc: caml-list Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p4J4FFlp025037 Subject: Re: [Caml-list] do i need a private row type? Hi Joel, the current version is a bit ahead of your version I think. you can cast any socket type to (generic Socket.t) so you can have different socket types inside the poll. This weekend I'm going to look at the bindings again. They need a serious fix. On Sun, May 15, 2011 at 2:56 PM, Joel Reymont wrote: > https://github.com/wagerlabs/ocaml-zmq/blob/master/src/ZMQ.ml > > Looking at the Poll module at the bottom and the definition of poll_item as > >  type 'a poll_item = ('a Socket.t * event_mask) > > I would like to be able to put different 'a in the same poll_item array. > > This is not possible as written, e.g. > > Error: This expression has type >         ZMQ.Socket.pub ZMQ.Socket.t * ZMQ.Poll.event_mask >       but an expression was expected of type >         ZMQ.Socket.pull ZMQ.Socket.t * ZMQ.Poll.event_mask > > How do I type poll_item and poll_item array so that the array is polymorphic with respect to 'a? > > Does the definition of Socket a the top of ZMQ.ml need to be changed to make this possible? > >        Thanks, Joel > > -------------------------------------------------------------------------- > - for hire: mac osx device driver ninja, kernel extensions and usb drivers > ---------------------+------------+--------------------------------------- > http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont > ---------------------+------------+--------------------------------------- > > > > > > -- > Caml-list mailing list.  Subscription management and archives: > https://sympa-roc.inria.fr/wws/info/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > >