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 BFC737F7B4 for ; Fri, 14 Feb 2014 10:39:55 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of alain@frisch.fr) identity=pra; client-ip=193.252.23.212; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="alain@frisch.fr"; x-sender="alain@frisch.fr"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of alain@frisch.fr) identity=mailfrom; client-ip=193.252.23.212; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="alain@frisch.fr"; x-sender="alain@frisch.fr"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@msa.smtpout.orange.fr) identity=helo; client-ip=193.252.23.212; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="alain@frisch.fr"; x-sender="postmaster@msa.smtpout.orange.fr"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmwBAM/j/VLB/BfUnGdsb2JhbABZDocJuSqDBoEsDgEBAQEBCAsJCRQogiUBAQUjFUARCxgCAgUWCwICCQMCAQIBRQYBDAgBAYgFpmuiABeBKY0dOoJvgUkBA5RDg2mGR45KQA X-IPAS-Result: AmwBAM/j/VLB/BfUnGdsb2JhbABZDocJuSqDBoEsDgEBAQEBCAsJCRQogiUBAQUjFUARCxgCAgUWCwICCQMCAQIBRQYBDAgBAYgFpmuiABeBKY0dOoJvgUkBA5RDg2mGR45KQA X-IronPort-AV: E=Sophos;i="4.95,843,1384297200"; d="scan'208";a="49061077" Received: from msa03.smtpout.orange.fr (HELO msa.smtpout.orange.fr) ([193.252.23.212]) by mail3-smtp-sop.national.inria.fr with ESMTP; 14 Feb 2014 10:39:55 +0100 Received: from [192.168.1.133] ([92.151.124.253]) by mwinf5d12 with ME id S9fu1n00j5U8taL039fuqk; Fri, 14 Feb 2014 10:39:55 +0100 Message-ID: <52FDE46B.5010805@frisch.fr> Date: Fri, 14 Feb 2014 10:39:55 +0100 From: Alain Frisch Reply-To: Alain Frisch User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Christophe Troestler , OCaml Mailing List References: <20140214.082352.48621319473754158.Christophe.Troestler@umons.ac.be> <52FDDA89.5070303@frisch.fr> In-Reply-To: <52FDDA89.5070303@frisch.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] First class modules aliases On 02/14/2014 09:57 AM, Alain Frisch wrote: > One way to fix it would be to tweak the > "strengthening" algorithm which adds equalities to module types in order > to turn a module type declaration to an alias to the original definition > instead of copying it. Another example which is fixed by this patch is the following (reported by my colleague David Waern): ============================================== module M = struct module type T = sig type t end type t = (module T) end module type X = sig module K: sig type t end end module Make(A : sig type t end)(X: X with type K.t = A.t) = struct end module Z = Make(M)(struct module K = M end) ============================================== -- Alain