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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id B54EE7F0A3 for ; Fri, 4 Sep 2015 22:28:49 +0200 (CEST) IronPort-PHdr: 9a23:iJECgxFgbLvEva7q7uTkw51GYnF86YWxBRYc798ds5kLTJ75r86wAkXT6L1XgUPTWs2DsrQf27aQ6/6rADBQqb+681k8M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJPK/jvHcaK1oLsh7z0o8OYOlkYzBOGIppMbzyO5T3LsccXhYYwYo0Q8TDu5kVyRuJN2GlzLkiSlRuvru25/Zpk7jgC86l5r50IeezAcq85Vb1VCig9eyBwvZWz9EqLcQzawVAVV2FethtTH0CR5xj/WtL1szDmnvtkxSSfe8zwV7E9Hzq4ufRFUhjt3QIOLT0k6ynyjdBsiOoPpRu7pAFkhYvTfJ2RHPV7d6LZO9gdQDwSDY5qSyVdD9bkPMM0BO0bMLMd9tGlqg== Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=markus.mottl@gmail.com; spf=Pass smtp.mailfrom=markus.mottl@gmail.com; spf=None smtp.helo=postmaster@mail-ig0-f181.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of markus.mottl@gmail.com) identity=pra; client-ip=209.85.213.181; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="markus.mottl@gmail.com"; x-sender="markus.mottl@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of markus.mottl@gmail.com designates 209.85.213.181 as permitted sender) identity=mailfrom; client-ip=209.85.213.181; receiver=mail2-smtp-roc.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 (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ig0-f181.google.com) identity=helo; client-ip=209.85.213.181; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="markus.mottl@gmail.com"; x-sender="postmaster@mail-ig0-f181.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DtAQAC/ulVm7XVVdFdg0A1aQaDHrpHgW+HNQc6EgEBAQEBAQEBEAEBAQEBBgsLCSEugh2CHxEEGQEUBx4DEhAPAiYCIwEBEQEFASITCBqHdgEDEqchggWBLz4xi0CBbIJ5iXMKGScNVoRUAQUOgRSFUYdKhSyBQwWVUXCKGoFtkzSFcBIjgReEQiIziUsBAQE X-IPAS-Result: A0DtAQAC/ulVm7XVVdFdg0A1aQaDHrpHgW+HNQc6EgEBAQEBAQEBEAEBAQEBBgsLCSEugh2CHxEEGQEUBx4DEhAPAiYCIwEBEQEFASITCBqHdgEDEqchggWBLz4xi0CBbIJ5iXMKGScNVoRUAQUOgRSFUYdKhSyBQwWVUXCKGoFtkzSFcBIjgReEQiIziUsBAQE X-IronPort-AV: E=Sophos;i="5.17,470,1437429600"; d="scan'208";a="176103683" Received: from mail-ig0-f181.google.com ([209.85.213.181]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 04 Sep 2015 22:28:49 +0200 Received: by igbkq10 with SMTP id kq10so20579833igb.0 for ; Fri, 04 Sep 2015 13:28:48 -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=E4w69gqSk2CARvg+iRp0Zvxhu/+7YSQT09z7DXZWPk8=; b=VQc6qwGeDSV2do6f/W8d3Sj/LDvOogR7VoaF+grqLZprUmTt1aF+gqQZZoYAZ+2N2M pLyG/V/+B5LwYemTbqs3/acQ2IBHoyNKI6WOG5uCOev6F2RNe5dPUlBRFCTw1Y/nUlpo Ggfz9QmEmMLwcOEWWP63qbC3Dpn9QZzIvgp01ufPvg/GguYts9itNbTOhcY4PVrBs75V jsD14RnFcn83DjODdfAkpYZzHdXBd1YwL13ci4nLeVGB21HuVdAjeyZXr34sudd4FXkI du3lNiIfQcFI9vH7UuMcdaLjAve8eKi+ZS/sX1XN+9ATSEjLIQ1/xg0lPb3RBD/LHhU4 evXw== MIME-Version: 1.0 X-Received: by 10.50.1.5 with SMTP id 5mr4129334igi.79.1441398527915; Fri, 04 Sep 2015 13:28:47 -0700 (PDT) Received: by 10.79.65.144 with HTTP; Fri, 4 Sep 2015 13:28:47 -0700 (PDT) Date: Fri, 4 Sep 2015 16:28:47 -0400 Message-ID: From: Markus Mottl To: OCaml List Content-Type: text/plain; charset=UTF-8 Subject: [Caml-list] Late adding of type variable constraints Hi, I wonder whether there is a way to add constraints to type variables in signatures after the signature was defined. E.g.: --- module type S = sig type 'a t type ('a, 'b) mappers val map : ('a, 'b) mappers -> 'a t -> 'b t end module type T = sig type 'a t constraint 'a = unit (* whatever *) include S with type 'a t := 'a t end --- The above will fail, because 'a has additional constraints for type "t" in signature "T". If I write instead e.g. "type 'a t = 'a list", this will work and also constrain the signature to something narrower. What makes constraints on polymorphic variables special here? Regards, Markus -- Markus Mottl http://www.ocaml.info markus.mottl@gmail.com