From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 6AE177EC76 for ; Mon, 11 May 2015 18:31:11 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of stedolan@stedolan.net) identity=pra; client-ip=209.85.218.45; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="stedolan@stedolan.net"; x-sender="stedolan@stedolan.net"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of stedolan@stedolan.net) identity=mailfrom; client-ip=209.85.218.45; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="stedolan@stedolan.net"; x-sender="stedolan@stedolan.net"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-oi0-f45.google.com) identity=helo; client-ip=209.85.218.45; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="stedolan@stedolan.net"; x-sender="postmaster@mail-oi0-f45.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BrAQDb2FBVlC3aVdFchEeDGMFjiQ0HOhIBAQEBAQEBEQEBAQEHCwsJHzCEORFnFQ8CJgIkEgEFASI1iAqkZoMwPjGLOI8FhHYKgReSDIFFBZ0glQ0SI4EVgWoBCwGCJIIzgQEBAQE X-IPAS-Result: A0BrAQDb2FBVlC3aVdFchEeDGMFjiQ0HOhIBAQEBAQEBEQEBAQEHCwsJHzCEORFnFQ8CJgIkEgEFASI1iAqkZoMwPjGLOI8FhHYKgReSDIFFBZ0glQ0SI4EVgWoBCwGCJIIzgQEBAQE X-IronPort-AV: E=Sophos;i="5.13,408,1427752800"; d="scan'208";a="117362336" Received: from mail-oi0-f45.google.com ([209.85.218.45]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 11 May 2015 18:31:04 +0200 Received: by oica37 with SMTP id a37so108804513oic.0 for ; Mon, 11 May 2015 09:31:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:date:message-id:subject:from :to:content-type; bh=c/4XlBKTMg4n2xNps+XYXowa2Lthmz8JDxdG7gM945Q=; b=TaGblDYQ4nGvAVaztzlA0B09zEi8JJv+g9cYNO8BOi2N69TUbb2Hq4OvsO8kFyxQcS nnqtiwcq+eXUDNm4RHFAKUOCTEi79+/Nmw40MTZ7jrTpY/AzTF5z8bbNbhMtQUibCvwP Qlu6t7jmGgN7j/t5NyAFp7KexefmTHN2Rse6GMAeOUmcdy3C2qf6yFFxDEMTlKE03geF x0ofJobrR4oCZQdbfVfKF5ZwGAkkYVTnYaVlR/iEbuLOt2vVYarngo1Mich/TL433uMq J3acBBj7QJbyoWucrHZw2NrcBufWPeRaZeHF6EQkmUcxelnaJW+o/OKERpBkEsLdZo7S X1ZQ== X-Gm-Message-State: ALoCoQl5oq7dZmaXJiDqzKjfjRmjD5/+pNdb31pJKRkLyKwkfihCrJuCEAwQiL2GZWY+IVfwV4qE MIME-Version: 1.0 X-Received: by 10.202.98.193 with SMTP id w184mr8075873oib.96.1431361863405; Mon, 11 May 2015 09:31:03 -0700 (PDT) Sender: stedolan@stedolan.net Received: by 10.202.169.202 with HTTP; Mon, 11 May 2015 09:31:03 -0700 (PDT) X-Originating-IP: [131.111.184.13] Date: Mon, 11 May 2015 17:31:03 +0100 X-Google-Sender-Auth: ogSIAPpXYtBFnZp53AWAXjd_o5A Message-ID: From: Stephen Dolan To: Ocaml Mailing List Content-Type: text/plain; charset=UTF-8 Subject: [Caml-list] Private types and subtyping My intuition is that exporting a private type from a module with "type t = private foo" makes "t" a new subtype of "foo". So, any means of eliminating "foo" can eliminate "t", but constructing my own "foo" does not necessarily mean I've made a "t". This intuition also says the following should be OK: module Sub : sig type t = private [`A | `B] end = struct type t = [`A] end The compiler (4.02.1) rejects this. Is this just a missing feature, or is there some deep reason I'm missing why the above is not OK? Stephen