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 p4FEFfJL026075 for ; Sun, 15 May 2011 16:15:41 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtUBANTez01KfVI0kGdsb2JhbACmDggUAQEBAQkJDQcUBCGqRoJCjBqCNYNpN4hiAQEDBoYTBJARhC+BEYVFO4M3 X-IronPort-AV: E=Sophos;i="4.64,369,1301868000"; d="scan'208";a="108600234" Received: from mail-ww0-f52.google.com ([74.125.82.52]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 15 May 2011 16:15:35 +0200 Received: by wwb31 with SMTP id 31so5083387wwb.9 for ; Sun, 15 May 2011 07:14:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:content-type:content-transfer-encoding :subject:date:message-id:to:mime-version:x-mailer; bh=xnWwoK08MyfKEq7/Q7N63n1wGIo6D9sCSSIwwz/PErc=; b=qU3uoMbnZfYZCWzrWGu9z7ytsDZ4RBqdCPk/eQnIgj5QYp2PjfVBOKDkNlBoLWCGuo zHbrBnst1zBXJJr39UmFItBZoPvW4ldWloYPze8umNVPL5XB1t2dkfhSWDBX7PaOZOmp LQoXEkI0uW2GfrbkF6MFugzBz5WTRcJlY7XEw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=WYOJ0nqwYQzcA4rmNmVHVMORFbSnUO5aenE5aNjd+zWArjKmoavJQMvEXZrWXhSdM1 NEMbYuXNMhxfj3SvbzjMdJlETx8T8nlVwSfj6M4lTJLkd9YWUzfIoohtaMb3Dh4YP3B2 I8V4UJd22sJ8mQnmo3FYNuvdWFqO1oxDK7aZo= Received: by 10.216.6.27 with SMTP id 27mr3170613wem.69.1305467813217; Sun, 15 May 2011 06:56:53 -0700 (PDT) Received: from [172.16.13.82] (0xc2efec01.hotspot.tele.dk [194.239.236.1]) by mx.google.com with ESMTPS id k76sm2071858wej.43.2011.05.15.06.56.51 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 15 May 2011 06:56:52 -0700 (PDT) From: Joel Reymont Content-Type: text/plain; charset=us-ascii Date: Sun, 15 May 2011 15:56:50 +0200 Message-Id: To: caml-list Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p4FEFfJL026075 Subject: [Caml-list] do i need a private row type? 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 ---------------------+------------+---------------------------------------