From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 91222BC57 for ; Tue, 7 Sep 2010 15:32:56 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiYFACbchUyNTDBjgWdsb2JhbACTSI0qFQEBFiIivgmFPQSKGA X-IronPort-AV: E=Sophos;i="4.56,328,1280700000"; d="scan'208";a="58754609" Received: from os.inf.tu-dresden.de ([141.76.48.99]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Sep 2010 15:32:56 +0200 Received: from [2002:8d4c:3001:48:222:68ff:fe19:71d] (helo=blau.inf.tu-dresden.de) by os.inf.tu-dresden.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) id 1OsyIB-0002j5-5u for caml-list@yquem.inria.fr; Tue, 07 Sep 2010 15:32:55 +0200 Received: from tews by blau.inf.tu-dresden.de with local (Exim 4.72) (envelope-from ) id 1OsyIA-0002dT-Aj for caml-list@yquem.inria.fr; Tue, 07 Sep 2010 15:32:54 +0200 From: Hendrik Tews To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] functor substitution gives error References: <19588.45205.199003.965321@blau.inf.tu-dresden.de> <29A499AD-55AD-4A5A-84EE-7BE4D0A98B14@gmail.com> Date: Tue, 07 Sep 2010 15:32:53 +0200 In-Reply-To: <29A499AD-55AD-4A5A-84EE-7BE4D0A98B14@gmail.com> (Jacques Garrigue's message of "Tue, 7 Sep 2010 19:48:21 +0900") Message-ID: <6xhbi1k7ay.fsf@blau.inf.tu-dresden.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam: no; 0.00; hendrik:01 tews:01 tews:01 functor:01 hendrik:01 compilation:01 compiler:01 bug:01 functor:01 compiler:01 ocaml:01 tu-dresden:01 wrote:01 typing:01 caml-list:01 Jacques Garrigue writes: On 2010/09/06, at 18:12, Hendrik Tews wrote: > I have a strange compilation problem, which I suspect to be a > compiler bug. Consider the following nested functor application The reason is that the typing of modules is not closed under substitution. I am really surprised by this! I was sure I hit a compiler problem, especially because changing the order of the with-constraints solved the problem. The solution is easy enough: name all modules. May I suggest to put a few words about this in the ocaml reference manual? Thanks for the hint, Hendrik