Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Goswin von Brederlow <goswin-v-b@web.de>
To: Julien Signoles <julien.signoles@gmail.com>
Cc: Goswin von Brederlow <goswin-v-b@web.de>, caml-list@inria.fr
Subject: Re: [Caml-list] RFH: Values do not match: val bar1 : Foo.foo_t is not  included in val bar1 : Foo.foo_t
Date: Tue, 25 May 2010 15:23:57 +0200	[thread overview]
Message-ID: <87vdact8r6.fsf@frosties.localdomain> (raw)
In-Reply-To: <AANLkTikEwJBiUI5xY8odDi_XH-dMPHb1EXRCdpDNNJN4@mail.gmail.com> (Julien Signoles's message of "Tue, 25 May 2010 10:28:59 +0200")

Julien Signoles <julien.signoles@gmail.com> writes:

> Hello,
>
> 2010/5/24 Goswin von Brederlow <goswin-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: 
>
>
>     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

That sounds like a bug then.

I was trying hard not to repeat information in different places. That
just ends up with one of them getting out of sync.

MfG
        Goswin


      reply	other threads:[~2010-05-25 13:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-23 22:03 Goswin von Brederlow
2010-05-25  8:28 ` [Caml-list] " Julien Signoles
2010-05-25 13:23   ` Goswin von Brederlow [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vdact8r6.fsf@frosties.localdomain \
    --to=goswin-v-b@web.de \
    --cc=caml-list@inria.fr \
    --cc=julien.signoles@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox