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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 6B3FEBB84 for ; Wed, 16 Jul 2008 00:49:17 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEALTGfEjAXQIn/2dsb2JhbACwYA X-IronPort-AV: E=Sophos;i="4.30,368,1212357600"; d="scan'208";a="15142787" Received: from concorde.inria.fr ([192.93.2.39]) by mail3-smtp-sop.national.inria.fr with ESMTP; 16 Jul 2008 00:48:38 +0200 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m6FMmcCf021228 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Wed, 16 Jul 2008 00:48:38 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkQDAHnGfEjIuX5EiGdsb2JhbACSPAEBAQ8gnX8 X-IronPort-AV: E=Sophos;i="4.30,368,1212357600"; d="scan'208";a="15142280" Received: from mta21.f3.k8.com.br ([200.185.126.68]) by mail1-smtp-roc.national.inria.fr with ESMTP; 16 Jul 2008 00:48:37 +0200 Received: from localhost (localhost [127.0.0.1]) by smtpa.f3.k8.com.br (Postfix) with ESMTP id 8F5DA2800097 for ; Tue, 15 Jul 2008 22:48:35 +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 9Q+JxFfcuNnb for ; Tue, 15 Jul 2008 22:48:35 +0000 (GMT) Received: from [189.25.240.37] (unknown [189.25.240.37]) by smtpa.f3.k8.com.br (Postfix) with ESMTP id 40C5A280008F for ; Tue, 15 Jul 2008 22:48:35 +0000 (GMT) Subject: Re: [Caml-list] Another question about modules From: Andre Nathan To: caml-list@inria.fr In-Reply-To: <1216154495.5294.9.camel@homesick> References: <1216154495.5294.9.camel@homesick> Content-Type: text/plain Date: Tue, 15 Jul 2008 19:51:39 -0300 Message-Id: <1216162299.5294.22.camel@homesick> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 487D2946.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; mli:01 val:01 mli:01 val:01 nathan:98 caml-list:01 int:01 int:01 expression:02 modules:02 unit:03 unit:03 let:03 let:03 problem:05 I think this is similar to this simpler problem: a.ml: type t = { id: int } let f x = print_int x.id; B.f x a.mli: type t val f : t -> unit b.ml: let f x = print_int 42 b.mli: val f : A.t -> unit Which results in "This expression has type t but is here used with type A.t" in a.ml, even though t and A.t are the same type. Is there a general solution for this kind of situation? Thanks, Andre