From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id EE9B37EE33 for ; Mon, 13 Feb 2017 19:23:25 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=sjs429@cornell.edu; spf=Pass smtp.mailfrom=sjs429@cornell.edu; spf=Pass smtp.helo=postmaster@limerock04.mail.cornell.edu Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of sjs429@cornell.edu) identity=pra; client-ip=128.84.13.244; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="sjs429@cornell.edu"; x-sender="sjs429@cornell.edu"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of sjs429@cornell.edu designates 128.84.13.244 as permitted sender) identity=mailfrom; client-ip=128.84.13.244; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="sjs429@cornell.edu"; x-sender="sjs429@cornell.edu"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of postmaster@limerock04.mail.cornell.edu designates 128.84.13.244 as permitted sender) identity=helo; client-ip=128.84.13.244; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="sjs429@cornell.edu"; x-sender="postmaster@limerock04.mail.cornell.edu"; x-conformance=sidf_compatible; x-record-type="v=spf1" IronPort-PHdr: =?us-ascii?q?9a23=3A+Fgf0x8/s+cZtP9uRHKM819IXTAuvvDOBiVQ1KB9?= =?us-ascii?q?0uocTK2v8tzYMVDF4r011RmSDNmduqkP0rOP++C4ACpbvsbH6ChDOLV3FDY7yu?= =?us-ascii?q?wu1zQ6B8CEDUCpZNXLVAcdWPp4aVl+4nugOlJUEsutL3fbo3m18CJAUk6nbVk9?= =?us-ascii?q?Dq3PF4XTl8W60fyps92WOl0QxWn1XbQnBxyzqU31t9IKyd9pI6M1jx/IuWdgeu?= =?us-ascii?q?JMxGouK0jFzDjm4cLlx4Ju/Spdvboa8slEUqyyK789SrhbBRwtKCY+49ftuB3H?= =?us-ascii?q?CwaD+y1PAS0tjhNUDl2dv1nBVZDrv36/77Il1Q=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BlAwAx+KFYhvQNVIBeRwEBBAEBCgEBh?= =?us-ascii?q?F0DOINSgTaJRJN8AZRgiAoHQhUBAQEBAQEBAQEBARIBAQEKCQsKHS+CMwQBFgE?= =?us-ascii?q?Egg0zZw0BAgU3AiQSAQUBIhuJYgWeU4NAP4wCgiWHeweDdhKTA4JfAQSQQYsxk?= =?us-ascii?q?hSBY48ikU4UHoEVNV5EIBQIFxNUBYNlAYJfiTaBTgEBAQ?= X-IPAS-Result: =?us-ascii?q?A0BlAwAx+KFYhvQNVIBeRwEBBAEBCgEBhF0DOINSgTaJRJN?= =?us-ascii?q?8AZRgiAoHQhUBAQEBAQEBAQEBARIBAQEKCQsKHS+CMwQBFgEEgg0zZw0BAgU3A?= =?us-ascii?q?iQSAQUBIhuJYgWeU4NAP4wCgiWHeweDdhKTA4JfAQSQQYsxkhSBY48ikU4UHoE?= =?us-ascii?q?VNV5EIBQIFxNUBYNlAYJfiTaBTgEBAQ?= X-IronPort-AV: E=Sophos;i="5.35,156,1484002800"; d="scan'208,217";a="260136943" Received: from limerock04.mail.cornell.edu ([128.84.13.244]) by mail2-smtp-roc.national.inria.fr with ESMTP; 13 Feb 2017 19:23:25 +0100 X-CornellRouted: This message has been Routed already. Received: from exchange.cornell.edu (sf-e2013-04.exchange.cornell.edu [10.22.40.51]) by limerock04.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id v1DINNDk026760 for ; Mon, 13 Feb 2017 13:23:23 -0500 Received: from sf-e2013-08.exchange.cornell.edu (10.22.40.55) by sf-e2013-04.exchange.cornell.edu (10.22.40.51) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 13 Feb 2017 13:23:11 -0500 Received: from mail-wr0-f198.google.com (209.85.128.198) by exchange.cornell.edu (10.22.40.55) with Microsoft SMTP Server (TLS) id 15.0.1210.3 via Frontend Transport; Mon, 13 Feb 2017 13:23:11 -0500 Received: by mail-wr0-f198.google.com with SMTP id 89so39354130wrr.1 for ; Mon, 13 Feb 2017 10:23:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=MSGvWD22t7LIQRG5iY7AW41w5r6OhW53qTyhw+buJ8o=; b=bHE0zWC2YqASRo/vlLUda/l5g9kTRVPFbfkkyLsJKqoRQLf+tp+ULpx9SbhQsIJU2A jmf4ybjUGdyVADnFvqtw+24uH40ieVSc1aJEvdAow1qqcPTWOpnGuvEiBw/I7NusRXvs eGXEZenZ6s4mrQ+zZPJ+uVanjMb0Pzx9JRnPhqdlEUIo7GLk7WWrNehc+DdlWE6Hwfg1 ej4oIAUpDtGQhsFWOviF1qZk6MFNAbdXCrqJ9MTB03DpOI4wejjZ5vSTxRPm4pFUVvxW vYYifz+kDYwif32Da6GeCOk2Dm0vozwNfVKUA/6UUfFZwV2KMw/xj6TZZYA9QMD74Q+F mGDg== X-Gm-Message-State: AMke39nzm5+uuVjoWye1ZTwyrU/OEKyk/xxBk/ghYVXEIAR6kt4ZRr5R0piCgEOX4b7BNeYuozuQ2wjUfJ3UkOLdHmhoMzfmqKbO1GgCKKhe3MszZTS0XOLvc+V0F6UrbwK4RGSoWhE76fvR01EX3FtbAoG9Zr9rnA== X-Received: by 10.28.16.211 with SMTP id 202mr42577343wmq.133.1487010202409; Mon, 13 Feb 2017 10:23:22 -0800 (PST) X-Received: by 10.28.16.211 with SMTP id 202mr42577335wmq.133.1487010202135; Mon, 13 Feb 2017 10:23:22 -0800 (PST) MIME-Version: 1.0 Sender: Received: by 10.28.87.132 with HTTP; Mon, 13 Feb 2017 10:23:21 -0800 (PST) From: Steffen Smolka Date: Mon, 13 Feb 2017 13:23:21 -0500 X-Google-Sender-Auth: -fnOeoJtRT_tMMyUuS-60CL2j4w Message-ID: To: Caml List Content-Type: multipart/alternative; boundary="001a11452ad8e041e105486d8a17" X-ORG-HybridRouting: 6fb8192df731cb7d053c5f45491d29de X-ORG-RouteOnPrem: False X-ORG-MsgSource: cmail X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none; Subject: [Caml-list] private object constructor? --001a11452ad8e041e105486d8a17 Content-Type: text/plain; charset="UTF-8" Hi, Is it possible to expose an object or class type in OCaml without exposing the constructor, i.e. the ability to construct objects of the type? OCaml supports private ADTs and type synonyms, but the private keyword doesn't seem to work with classes or objects. Thanks, -- Steffen --001a11452ad8e041e105486d8a17 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

Is it possible to expose an object or cla= ss type in OCaml without exposing the constructor, i.e. the ability to cons= truct objects of the type? OCaml supports private ADTs and type synonyms, b= ut the private keyword doesn't seem to work with classes or objects.

Thanks,
-- Steffen
--001a11452ad8e041e105486d8a17--