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 p4GA6Pq4000864 for ; Mon, 16 May 2011 12:06:25 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuQBANz10E1KfVK2kGdsb2JhbACmCwgUAQEBAQkJDQcUBCGqF4wagjWEKDeIYgEBAwaGEwSQEYQvgRGFRTuDNw X-IronPort-AV: E=Sophos;i="4.64,373,1301868000"; d="scan'208";a="108667048" Received: from mail-wy0-f182.google.com ([74.125.82.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 16 May 2011 12:06:20 +0200 Received: by wyf23 with SMTP id 23so5956186wyf.27 for ; Mon, 16 May 2011 03:05:31 -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=trWx7sfWKh35OO09e3Xz46MSADlr9IFPAnheBdouG3E=; b=QtsU/Aifotaurt1gUEqlIWDSXkkjmc22K2P86BtJuuXGDEW3tVVaPh86Ew6AZe09dH Pc+qdJZNIRNeIMGZrjTfKj1eoHxc/cipjtVs+WjmcZdmHBiWiot5Od/NV9UdWDuzjUFe cZCH/5SnWAujSEHtAl39EE81n57dn7OTpWUyM= 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=Ydca4CNhPUMwrzFgbSLITq9s9V1646/VabmLPgsQS9E1F0vMVKBnf3VY0+qfV7HBr8 eO108eoS8hF5cKelLeWYXA91Am/jOhv0XRXsg+dmULuIo9fPsf7zGlGCfdzVzYgxUMSp Qn+5arXM3RXYD9fgGncc1sf5gNoq7Kym1kt2Y= Received: by 10.217.6.79 with SMTP id x57mr2108544wes.10.1305540330424; Mon, 16 May 2011 03:05:30 -0700 (PDT) Received: from [10.0.1.31] ([87.54.60.37]) by mx.google.com with ESMTPS id o6sm1557877wep.41.2011.05.16.03.05.28 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 16 May 2011 03:05:29 -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 12:05:27 +0200 Cc: Goswin von Brederlow , caml-list Message-Id: References: <87wrhr9n88.fsf@frosties.localnet> 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 p4GA6Pq4000864 Subject: Re: [Caml-list] do i need a private row type? Typing it this way module Poll : sig type t type poll_socket = [`Pair|`Pub|`Sub|`Req|`Rep|`Dealer|`Router|`Pull|`Push] Socket.t type poll_item = (poll_socket * event_mask) val of_poll_items : poll_item array -> t ... end I get a different error when using of_poll_items with two different socket types: File "src/dawn.ml", line 73, characters 44-52: Error: This expression has type [ `Pub ] ZMQ.Socket.t * ZMQ.Poll.event_mask but an expression was expected of type [ `Pull ] ZMQ.Socket.t * ZMQ.Poll.event_mask These two variant types have no intersection This is the difference between type poll_socket = [>...] Socket.t and type poll_socket = [...] Socket.t What is the proper way to type this? Thanks, Joel -------------------------------------------------------------------------- - for hire: mac osx device driver ninja, kernel extensions and usb drivers ---------------------+------------+--------------------------------------- http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont ---------------------+------------+---------------------------------------