From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id pAAC8gDc006744 for ; Thu, 10 Nov 2011 13:08:42 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgUCAAO+u06LEwExe2dsb2JhbABCDqodIgEBFiYFIIFyAQEBAwEyAQ0BATcBBAsFBhguVwYTEYdxpQiEEwGOYQeJfpQskTs4 X-IronPort-AV: E=Sophos;i="4.69,488,1315173600"; d="scan'208";a="118070396" Received: from hera.mpi-sb.mpg.de ([139.19.1.49]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 10 Nov 2011 13:08:36 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mpi-sb.mpg.de; s=mail200803; h=Message-ID:In-Reply-To: References:Date:Subject:From:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=SQVKKssz+CY4hY0Pow2haLyUJz9DnYWt+o vToSaFBDU=; b=sw2U7d5iDkOXyO6EtZKi+x8zA0SXpbk8igFC949xZXNyAIieCa xnmkrdgPwbpsjxQZP6LObTLd+vN9PQB1o56hTgWUUKugaJDQ6CKJow6OEK1ygQQf 0KAQl8UWX5DWaWc7ESkYjba8NVbQu7gEa3I1oOIgrP2cJRyptYUNurJ2A= Received: from infao0525.mpi-klsb.mpg.de ([139.19.1.26]:33318 helo=maniac.mpi-klsb.mpg.de) by hera.mpi-sb.mpg.de (envelope-from ) with esmtp (Exim 4.69) id 1ROTQl-0000pr-KJ; Thu, 10 Nov 2011 13:08:33 +0100 Received: from local by maniac.mpi-klsb.mpg.de (envelope-from ) with local (Exim 4.69) id 1ROTQl-0007EJ-1k; Thu, 10 Nov 2011 13:08:31 +0100 Received: from 74.125.57.233 (SquirrelMail authenticated user rossberg) by mail.mpi-sws.org with HTTP; Thu, 10 Nov 2011 13:08:31 +0100 (CET) Message-ID: In-Reply-To: <36C77095-6853-45FA-9A62-CD7CBC9AC7D4@math.nagoya-u.ac.jp> References: <1320823798.6647.2.camel@Nokia-N900> <4EBA9F1B.3060801@gmail.com> <4EBAA144.6050701@gmail.com> <36C77095-6853-45FA-9A62-CD7CBC9AC7D4@math.nagoya-u.ac.jp> Date: Thu, 10 Nov 2011 13:08:31 +0100 (CET) From: rossberg@mpi-sws.org To: "Jacques Garrigue" Cc: rossberg@mpi-sws.org, "Vincent Aravantinos" , caml-list@inria.fr, "Cedric Cellier" User-Agent: SquirrelMail/1.4.15 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: [Caml-list] Include question > On 2011/11/10, at 1:29, rossberg@mpi-sws.org wrote: >> Vincent Aravantinos wrote: >>> This verbosity problem is actually less true since 3.12 with the >>> introduction of "module type of": >>> >>> module A = struct >>> ... >>> end >>> >>> module Make_B (X: module type of A) = struct >>> ... >>> end >>> >>> Which is then quite close to the "include" version. >> >> Except that it defeats the whole point of functorizing, because you won't >> be >> able to plug in another module than A anymore (unless A defines no >> abstract >> types, in which case you can get away with it). > > This is actually the opposite: "module type of A" gives no equation for the > abstract types, so if module A contained an abstract type, you will be able > to change it by another abstract one. On the other hand, all concrete types > will stay there, and you will have no way to change them even if Make_B > doesn't care. Oh, interesting. I was under the impression that A's signature gets selfified as usual, so that sig module X : module type of A end is equivalent to sig module X : SA end with module X = A (Have no Ocaml 3.12 around here, unfortunately.) Thanks for the correction! /Andreas