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 5276581792 for ; Mon, 24 Jun 2013 18:49:59 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of markus.mottl@gmail.com) identity=pra; client-ip=209.85.212.170; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="markus.mottl@gmail.com"; x-sender="markus.mottl@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of markus.mottl@gmail.com designates 209.85.212.170 as permitted sender) identity=mailfrom; client-ip=209.85.212.170; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="markus.mottl@gmail.com"; x-sender="markus.mottl@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wi0-f170.google.com) identity=helo; client-ip=209.85.212.170; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="markus.mottl@gmail.com"; x-sender="postmaster@mail-wi0-f170.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtoBABR4yFHRVdSqk2dsb2JhbABbgzpJwDUIFg4BAQEBBwsLCRQEJIJqARQHHgMSEFwBAREBBQEiExuHYAEDD5pAgn6MTYJ/hDMKGScNWId0AQUMjFyGUQOVXIFnjCCDPxYphFIg X-IPAS-Result: AtoBABR4yFHRVdSqk2dsb2JhbABbgzpJwDUIFg4BAQEBBwsLCRQEJIJqARQHHgMSEFwBAREBBQEiExuHYAEDD5pAgn6MTYJ/hDMKGScNWId0AQUMjFyGUQOVXIFnjCCDPxYphFIg X-IronPort-AV: E=Sophos;i="4.87,929,1363129200"; d="scan'208";a="18818153" Received: from mail-wi0-f170.google.com ([209.85.212.170]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 24 Jun 2013 18:49:58 +0200 Received: by mail-wi0-f170.google.com with SMTP id ey16so2882197wid.5 for ; Mon, 24 Jun 2013 09:49:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=w9Nj1iy1NuXurkiTISvqwOeAshs1oITR4RU6kFYSmQg=; b=fcDM+4m8RNJ+Csi6iZk5yB+sY2BFq0knKlxD2t1JW8PnQ3haahNSnNoNy+96qbvLJR kN4/g9uq2x90L81o/1zO770WX7OyKOGn+qUKcA9cUFTjQJVVdILNZO5v7TOfcontrJDw WqdIOmgK2KBFKBwt/OrcYUyU2m/kJsFZfL5/PH7Py2zBMTqQSyR+CSZ+Ht8KRZMFEaJe 5kGpzAym2vZziP+RR3SDW9GETgszl3GJVfazIl+BhwL1x6BDzP/r2x6LduFr/Jf3Jhqb svvD+sbPx/lvyguXfphyf5raj3p+Lb9LjRD9hsaEH9MAst8nd+aafx0HxgvxjrFohjAP 1L2Q== MIME-Version: 1.0 X-Received: by 10.194.122.103 with SMTP id lr7mr17145233wjb.15.1372092598566; Mon, 24 Jun 2013 09:49:58 -0700 (PDT) Received: by 10.194.172.169 with HTTP; Mon, 24 Jun 2013 09:49:58 -0700 (PDT) Date: Mon, 24 Jun 2013 12:49:58 -0400 Message-ID: From: Markus Mottl To: OCaml List Content-Type: text/plain; charset=ISO-8859-1 Subject: [Caml-list] Restrictions on signature substitutions What's actually the deeper reason why the following is rejected: module type S = sig type t end module type T = S with type t := int list Error message: Error: Only type constructors with identical parameters can be substituted. I found this restriction quite annoying on multiple occasions. At first sight it seems easy to just introduce a workaround "type foo = int list" and then substitute "foo". But if the above definitions are themselves part of a signature, this would require polluting the containing signature with a new type or come up with more convoluted solutions. I suspect it's merely hard to support the above in the current type system implementation, probably for a similar reason why substitutions in sub-modules are disallowed. Or is there some more fundamental reason why this cannot be supported? Regards, Markus -- Markus Mottl http://www.ocaml.info markus.mottl@gmail.com