From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p1I8UboZ015412 for ; Fri, 18 Feb 2011 09:30:37 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArEBAF+8XU0uaTjRmWdsb2JhbACmNQEBAQEBCAsKBxEkvBGFXgQ X-IronPort-AV: E=Sophos;i="4.62,186,1297033200"; d="scan'208";a="100169502" Received: from 3.27.mail-out.ovh.net (HELO 27.mail-out.ovh.net) ([46.105.56.209]) by mail1-smtp-roc.national.inria.fr with SMTP; 18 Feb 2011 09:30:32 +0100 Received: (qmail 22324 invoked by uid 503); 18 Feb 2011 09:23:16 -0000 Received: from b9.ovh.net (HELO mail629.ha.ovh.net) (213.186.33.59) by 27.mail-out.ovh.net with SMTP; 18 Feb 2011 09:23:09 -0000 Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 18 Feb 2011 10:31:41 +0200 Received: from ip-22.net-82-216-3.versailles2.rev.numericable.fr (HELO ?192.168.0.10?) (forum%x9c.fr@82.216.3.22) by ns0.ovh.net with SMTP; 18 Feb 2011 10:31:40 +0200 From: "forum@x9c.fr" Content-Type: text/plain; charset=us-ascii Date: Fri, 18 Feb 2011 09:30:24 +0100 Message-Id: <81B704C0-2971-47D8-BB9E-3F259016AB92@x9c.fr> Cc: "forum@x9c.fr" To: caml-list users Mime-Version: 1.0 (Apple Message framework v1082) X-Mailer: Apple Mail (2.1082) X-Ovh-Tracer-Id: 3345048624647504672 X-Ovh-Remote: 82.216.3.22 (ip-22.net-82-216-3.versailles2.rev.numericable.fr) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: DONE|U 0.5/N Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p1I8UboZ015412 Subject: [Caml-list] Definition of module synonyms Dear list, Following the goal of providing module synonyms (e. g. abbreviations for lazy developers), it seemed natural to do something along the following lines: module M : sig type t = A val x : t end = struct type t = A let x = A end module S : sig type t = M.t = A include module type of M with type t := M.t end = M However, this is rejected with the following message: include module type of M with type t := M.t ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error: In this `with' constraint, the new definition of t does not match its original definition in the constrained signature: Type declarations do not match: type t = M.t is not included in type t = A Their kinds differ. The very same problem arise when defining type "t" as a record, but not when defining it as either an arrow type, or a polymorphic variant type. So my guess is that I am missing something obvious about name scoping, but cannot just get my finger on it. Any insight would be greatly appreciated. Regards, Xavier Clerc