From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 2907BBB84 for ; Tue, 15 Jul 2008 22:38:35 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAACofEjAXQIm/2dsb2JhbACwUA X-IronPort-AV: E=Sophos;i="4.30,368,1212357600"; d="scan'208";a="15139412" Received: from discorde.inria.fr ([192.93.2.38]) by mail1-smtp-roc.national.inria.fr with ESMTP; 15 Jul 2008 22:38:34 +0200 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m6FKcYJ2005194 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 15 Jul 2008 22:38:34 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkQDAIinfEjIuX5EiGdsb2JhbACSPgEBAQ8gnWk X-IronPort-AV: E=Sophos;i="4.30,368,1212357600"; d="scan'208";a="27353146" Received: from mta21.f3.k8.com.br ([200.185.126.68]) by mail4-smtp-sop.national.inria.fr with ESMTP; 15 Jul 2008 22:38:33 +0200 Received: from localhost (localhost [127.0.0.1]) by smtpa.f3.k8.com.br (Postfix) with ESMTP id 768872800097 for ; Tue, 15 Jul 2008 20:38:31 +0000 (GMT) X-Virus-Scanned: amavisd-new at k8.com.br Received: from smtpa.f3.k8.com.br ([127.0.0.1]) by localhost (mta21.f3.k8.com.br [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 6gdVBRLCRecE for ; Tue, 15 Jul 2008 20:38:31 +0000 (GMT) Received: from [189.25.240.37] (unknown [189.25.240.37]) by smtpa.f3.k8.com.br (Postfix) with ESMTP id 21925280008C for ; Tue, 15 Jul 2008 20:38:31 +0000 (GMT) Subject: Another question about modules From: Andre Nathan To: caml-list@inria.fr Content-Type: text/plain Date: Tue, 15 Jul 2008 17:41:35 -0300 Message-Id: <1216154495.5294.9.camel@homesick> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 487D0ACA.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; sig:01 val:01 val:01 struct:01 mli:01 sig:01 mli:01 mismatch:01 nathan:98 compile:01 int:01 int:01 modules:02 modules:02 match:02 Hello I'm having an issue that is similar to the one reproduced in the code below: a.ml: module SubA : sig type t val f : t -> unit val id : t -> int end = struct type t = { id: int } let f = B.f let id x = x.id end a.mli: module SubA : sig type t val f : t -> unit val id : t -> int end b.ml: open A let f x = print_int (SubA.id x) b.mli: open A val f : SubA.t -> unit When I compile this, I get the following message: File "a.ml", line 7, characters 2-75: Signature mismatch: Modules do not match: sig type t = { id : int; } val f : A.SubA.t -> unit val id : t -> int end is not included in sig type t val f : t -> unit val id : t -> int end Values do not match: val f : A.SubA.t -> unit is not included in val f : t -> unit Shouldn't "t" (from A.SubA) and A.SubA.t be recognized as the same type here? I don't understand why they aren't. Is there any workaround for this issue or is this kind of thing (yet again) a sign that there's something fishy in my design? Thanks in advance, Andre