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 p4G9WduT031632 for ; Mon, 16 May 2011 11:32:39 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlgDAMPu0E1KfVI0kGdsb2JhbACmCwgUAQEBAQkJDQcUBCGqOIwagjWEKDeIYgEBAwaGEwSQEYQvgRGFRTuDNw X-IronPort-AV: E=Sophos;i="4.64,373,1301868000"; d="scan'208";a="108662470" Received: from mail-ww0-f52.google.com ([74.125.82.52]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 16 May 2011 11:32:33 +0200 Received: by wwb31 with SMTP id 31so5752251wwb.9 for ; Mon, 16 May 2011 02:31:44 -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=xXPIyBGqRLpRj0Pcu5oB5yxevAch5BWJzgazd19/EJg=; b=Zyg/DHvqrZXv2kmlRHeA0UL/7w9EFUVKX8H+3twGLXwS4BShwvNvh7XCmRnX7cgclo DvAKBY/uDnMNtTMYYMHL63nlHoo372m7vA5TsSDyX2CTsZ4cDwxDEwHMzA8z5C5Wt1/O CLGeiDaseVJIAdPu287zEJTN/3OQY519ryeew= 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=KVY3vNwhhgttxfNLiN5H6z8PQqtYg2WG3nPEV0YvttkbeABXyGEpPY4D5vlgAHBYph txrYReZkghAFT16u1rIDN80GQEusmwJeFYiRH1UL0IfUggZaGSR6rq3CgF9Z13CrFBH0 vwkaYDhcJIfZe853PbL3aRmllwwv/dICJ6zu4= Received: by 10.216.254.207 with SMTP id h57mr1173074wes.63.1305538304667; Mon, 16 May 2011 02:31:44 -0700 (PDT) Received: from [10.0.1.31] ([87.54.60.37]) by mx.google.com with ESMTPS id g58sm2453063wen.44.2011.05.16.02.31.42 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 16 May 2011 02:31:43 -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:31:41 +0200 Cc: Goswin von Brederlow , caml-list Message-Id: <1EE6C9D2-A983-4E59-8C0A-98A72AB7D447@gmail.com> 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 p4G9WduT031632 Subject: Re: [Caml-list] do i need a private row type? The socket is typed the way it is because of these two functions: val subscribe : sub t -> string -> unit val unsubscribe : sub t -> string -> unit Meaning that you should only be able to use subscribe and unsubscribe on sockets created with type sub Socket.t ('a = sub). This reminds me an example with phantom types I saw somewhere, possibly in the context of Xen and its OCaml bindings. This is where you can only use certain functions that access memory on memory that has been initialized. Maybe phantom types are called for here. -------------------------------------------------------------------------- - for hire: mac osx device driver ninja, kernel extensions and usb drivers ---------------------+------------+--------------------------------------- http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont ---------------------+------------+---------------------------------------