From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 0B28CBC57 for ; Tue, 25 May 2010 10:29:00 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvUBACon+0tKfVK2mGdsb2JhbACdcggVAQEBAQEICQwHESKtE4IBhUsuiE8BAQMFhQ4E X-IronPort-AV: E=Sophos;i="4.53,297,1272837600"; d="scan'208";a="59965148" Received: from mail-wy0-f182.google.com ([74.125.82.182]) by mail1-smtp-roc.national.inria.fr with ESMTP; 25 May 2010 10:28:59 +0200 Received: by mail-wy0-f182.google.com with SMTP id 39so879269wyb.27 for ; Tue, 25 May 2010 01:28:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=QMTlxH2n0+XhmJg6EL3sXP4wpB5LSXzu7TQkzIT5RiI=; b=HeFgr4BpQp1GnapQsLMfW+X7cKjVe3u//idjyM0rEs0ir2cghmxkZdnFUCm/9eNMfJ aRPf/2SzEMy8aQy8UY6bcjKv+15fHfdof3AppfHwRzZWwvW7o1HzTGlMOvDa4TuiIgUv ESX5P3HaxF5EPpyiYOuZZpBVS5lNESKWeLxPM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=lGZ1kHkPczieLMDebj3pqC8Wdj06omfiy0sLlHT8ObKXbMlbg1i/y//ewv0K/ocpEF 0M5CwzhEjhGVG/nSM2CJ54UdBur2qUJZMsA7eV/8GTMVizOJKb+DkYi7mlzIBK+WaNzq nWFLXFwgf2Cx7j27uRYiJ7Mztl+4XSvDIACv0= MIME-Version: 1.0 Received: by 10.216.160.67 with SMTP id t45mr4326643wek.158.1274776139629; Tue, 25 May 2010 01:28:59 -0700 (PDT) Received: by 10.216.181.65 with HTTP; Tue, 25 May 2010 01:28:59 -0700 (PDT) In-Reply-To: <87632el1ii.fsf@frosties.localdomain> References: <87632el1ii.fsf@frosties.localdomain> Date: Tue, 25 May 2010 10:28:59 +0200 Message-ID: Subject: Re: [Caml-list] RFH: Values do not match: val bar1 : Foo.foo_t is not included in val bar1 : Foo.foo_t From: Julien Signoles To: Goswin von Brederlow Cc: caml-list@inria.fr Content-Type: multipart/alternative; boundary=0016367b633cf88638048766f204 X-Spam: no; 0.00; val:01 foo:01 foo:01 val:01 signoles:01 signoles:01 cmx:01 mli:01 sig:01 extern:01 sig:01 intern:01 generative:01 mli:01 dfb:01 --0016367b633cf88638048766f204 Content-Type: text/plain; charset=ISO-8859-1 Hello, 2010/5/24 Goswin von Brederlow > I'm playing around with packs and ways to avoid having to duplicate > module signatures all over the place. So I came up with the following > idea: Each module declares an external and internal module type and > restricts itself to the internal type. The pack then further restricts > the module to the external type. > > But then I get a type error I can't make heads or tails of: > File "pack.cmx", line 1, characters 0-1: > Error: The implementation (obtained by packing) > does not match the interface pack.mli: > Modules do not match: > sig > module type Extern = sig val bar1 : Foo.foo_t end > module type Intern = > sig val bar1 : Foo.foo_t val bar2 : Foo.foo_t end > module I : sig val bar1 : Foo.foo_t val bar2 : Foo.foo_t end > val bar1 : Foo.foo_t > val bar2 : Foo.foo_t > end > is not included in > sig val bar1 : Foo.foo_t end > Values do not match: > val bar1 : Foo.foo_t > is not included in > val bar1 : Foo.foo_t > make: *** [all] Error 2 > > Can anyone explain that to me? > The error message is not very helpful here. But don't refer to an internal generative type (namely Foo.foo_t) in your packing signature pack.mli. To solve your issue, you have to declare the type foo_t outside the pack like I said in a previous message ( http://caml.inria.fr/pub/ml-archives/caml-list/2010/05/b79d812d9dfb99e12c8e924f83d7168c.en.html ). Hope this helps, Julien --0016367b633cf88638048766f204 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello,

2010/5/24 Goswin von Brederlow <g= oswin-v-b@web.de>
I'm playing around with packs and ways to avoid having to duplicate
module signatures all over the place. So I came up with the following
idea: Each module declares an external and internal module type and
restricts itself to the internal type. The pack then further restricts
the module to the external type.

But then I get a type error I can't make heads or tails of:=A0

File "pack.cmx", line 1, characters 0-1:
Error: The implementation (obtained by packing)
=A0 =A0 =A0 does not match the interface pack.mli:
=A0 =A0 =A0 Modules do not match:
=A0 =A0 =A0 =A0 sig
=A0 =A0 =A0 =A0 =A0 module type Extern =3D sig val bar1 : Foo.foo_t end =A0 =A0 =A0 =A0 =A0 module type Intern =3D
=A0 =A0 =A0 =A0 =A0 =A0 sig val bar1 : Foo.foo_t val bar2 : Foo.foo_t end<= br> =A0 =A0 =A0 =A0 =A0 module I : sig val bar1 : Foo.foo_t val bar2 : Foo.foo= _t end
=A0 =A0 =A0 =A0 =A0 val bar1 : Foo.foo_t
=A0 =A0 =A0 =A0 =A0 val bar2 : Foo.foo_t
=A0 =A0 =A0 =A0 end
=A0 =A0 =A0 is not included in
=A0 =A0 =A0 =A0 sig val bar1 : Foo.foo_t end
=A0 =A0 =A0 Values do not match:
=A0 =A0 =A0 =A0 val bar1 : Foo.foo_t
=A0 =A0 =A0 is not included in
=A0 =A0 =A0 =A0 val bar1 : Foo.foo_t
make: *** [all] Error 2=A0


Can anyone explain that to me?

The error message i= s not very helpful here. But don't refer to an internal generative type= (namely Foo.foo_t) in your packing signature pack.mli. To solve your issue, you have to declare the type foo_t outside the pack like I said in a previous message (http://caml.inria.fr/pub/ml-archives/caml= -list/2010/05/b79d812d9dfb99e12c8e924f83d7168c.en.html).

Hope this helps,
Julien

--0016367b633cf88638048766f204--