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 p4G9x0xI000424 for ; Mon, 16 May 2011 11:59:00 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuQBABz00E1KfVK2kGdsb2JhbACmCwgUAQEBAQkJDQcUBCGqIYwagjWEKDeIYgEBAwaGEwSQEYQvgRGFRTuDNw X-IronPort-AV: E=Sophos;i="4.64,373,1301868000"; d="scan'208";a="99114131" Received: from mail-wy0-f182.google.com ([74.125.82.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 16 May 2011 11:58:54 +0200 Received: by mail-wy0-f182.google.com with SMTP id 23so5948042wyf.27 for ; Mon, 16 May 2011 02:58:54 -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=AAA8VP4TncJav13xBP24ttkMCsVzcdzEm8dtVV2vp0w=; b=W8y60S5it+Td6QnntIk+d+epPp+8UNPJCR2303kbzHGQWwm0l0MtRx8LYp4CpQHaZE 61Qz1j4Bf7G97GM3V/Djr3TaDGW74HBHwu9ieE600ExuQWa62vZCzZr24LkdrVVmqneU vKy1law1H/la7Lnff3hUECmJLcsi9DuT69/LE= 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=o63U59l87DP3qQKYUwUfDqzjbK/afgdmzNNkh2xfEv4vXiprtLf88SU8QPhi5ZK4dv fnS7zE+xQZPPTgQVy/BLMZBur74FNhkUzPOJnb4OxdvF2gbDa3ZrkBxnOfVYAAZF5mV6 H/4qrvLoPLmYnMuTzy1Ed49Qora5Cd4b5cMlA= Received: by 10.216.221.206 with SMTP id r56mr2074044wep.28.1305539934528; Mon, 16 May 2011 02:58:54 -0700 (PDT) Received: from [10.0.1.31] ([87.54.60.37]) by mx.google.com with ESMTPS id o23sm3030035wbc.61.2011.05.16.02.58.52 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 16 May 2011 02:58:53 -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 11:58:50 +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 p4G9x0xI000424 Subject: Re: [Caml-list] do i need a private row type? What about this? It almost works, e.g. File "ZMQ.mli", line 125, characters 7-99: Error: A type variable is unbound in this type declaration. In type ([> `Dealer | `Pair | `Pub | `Pull | `Push | `Rep | `Req | `Router | `Sub ] as 'a) Socket.t * event_mask the variable 'a is unbound I marked line 125 below. Thanks, Joel --- module Socket : sig type 'a t type 'a kind val pair : [`Pair] kind val pub : [`Pub] kind val sub : [`Sub] kind val req : [`Req] kind val rep : [`Rep] kind val dealer : [`Dealer] kind val router : [`Router] kind val pull : [`Pull] kind val push : [`Push] kind ... val subscribe : [`Sub] t -> string -> unit val unsubscribe : [`Sub] t -> string -> unit end module Device : sig val streamer : [`Pull] Socket.t -> [`Push] Socket.t -> unit val forwarder : [`Sub] Socket.t -> [`Pub] Socket.t -> unit val queue : [`Router] Socket.t -> [`Dealer] Socket.t -> unit end module Poll : sig type t type event_mask = In | Out | In_out type poll_socket = [>`Pair|`Pub|`Sub|`Req|`Rep|`Dealer|`Router|`Pull|`Push] Socket.t (* <---- line 125 *) type poll_item = (poll_socket * event_mask) val of_poll_items : poll_item array -> t val poll : ?timeout: int -> t -> poll_item array end -------------------------------------------------------------------------- - for hire: mac osx device driver ninja, kernel extensions and usb drivers ---------------------+------------+--------------------------------------- http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont ---------------------+------------+---------------------------------------