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 3DBD67F6CB for ; Thu, 29 Jan 2015 00:39:58 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of milanst@gmail.com) identity=pra; client-ip=209.85.223.177; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="milanst@gmail.com"; x-sender="milanst@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of milanst@gmail.com designates 209.85.223.177 as permitted sender) identity=mailfrom; client-ip=209.85.223.177; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="milanst@gmail.com"; x-sender="milanst@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ie0-f177.google.com) identity=helo; client-ip=209.85.223.177; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="milanst@gmail.com"; x-sender="postmaster@mail-ie0-f177.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BfAQA0cslUm7HfVdFag1hZBIJ9wVOHDAdDAQEBAQERAQEBAQEGCwsJFC6EJREdARseAxIQDwImAiQBEQEFASI1h3UBAxGwZ4MrPjGLLoFrgneLHQoZJw1UhQEBBQ6BE5FGgUEFig2OCZB8EiOBDAmELiAxgkIBAQE X-IPAS-Result: A0BfAQA0cslUm7HfVdFag1hZBIJ9wVOHDAdDAQEBAQERAQEBAQEGCwsJFC6EJREdARseAxIQDwImAiQBEQEFASI1h3UBAxGwZ4MrPjGLLoFrgneLHQoZJw1UhQEBBQ6BE5FGgUEFig2OCZB8EiOBDAmELiAxgkIBAQE X-IronPort-AV: E=Sophos;i="5.09,483,1418079600"; d="scan'208";a="119091027" Received: from mail-ie0-f177.google.com ([209.85.223.177]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 29 Jan 2015 00:39:57 +0100 Received: by mail-ie0-f177.google.com with SMTP id vy18so26628796iec.8 for ; Wed, 28 Jan 2015 15:39:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=0pxlRCIrnEc5SgYRpNJDFvnl3D48D+07Ge56dJjv760=; b=jKFzOpjmKlNaT+pmQm370zN4NpNXFmUprjn0mRzxj4w6l33ZGzEv1Km7NbcDk1QxKF sFBqtWqT0EwNR+I1O7u2jq4sEgOb48TYANzEfZm2jKjeEEOLXapJ77Q8JxIGULrNWRRv rPpV1IkpSBgwdSLbzCMY9jZRIk94TGeyrDJv/+sySkFPGBJC1YAQU0C/RwX60rRzTtto NnC8UDkMaw+sXcYtiPO7EXSZZ7wF07KZpfkD18cVIpYUkEo3Nl33FfHS6jtksu/EMxQL th93bZsLLzgyZuXZ++nx6v5TmjROyQPJwFONuYhvmXOyzoOUWtd6bo1Um0Ubz4/7fti1 qzmA== X-Received: by 10.50.50.142 with SMTP id c14mr285589igo.42.1422488396637; Wed, 28 Jan 2015 15:39:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.65.226 with HTTP; Wed, 28 Jan 2015 15:39:16 -0800 (PST) From: =?UTF-8?Q?Milan_Stanojevi=C4=87?= Date: Wed, 28 Jan 2015 18:39:16 -0500 Message-ID: To: Caml List Content-Type: text/plain; charset=UTF-8 Subject: [Caml-list] first class module types with "with type" My search foo is failing me, I'm pretty sure this was discussed before but I can't find it. Why is the following disallowed: module type A = sig type 'a t end type foo = { a : (module A with type 'a t = 'a list)} File "z.ml", line 2, characters 29-30: Error: Syntax error But this is ok module type A = sig type 'a t end module type S = A with type 'a t = 'a list type a = (module S) If [t] is not polymorphic then I don't need intermediate module type module type A = sig type t end type a = (module A with type t = int) What is going on here?