From: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
To: Dawid Toton <d0@wp.pl>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Numbered modules in error messages
Date: Thu, 7 Jun 2012 01:23:52 +0900 [thread overview]
Message-ID: <90B44972-C96B-435E-9353-5CF4F845FEBF@math.nagoya-u.ac.jp> (raw)
In-Reply-To: <4FCF2B1F.4050902@wp.pl>
On 2012/06/06, at 19:04, Dawid Toton wrote:
> Is it possible to make use of the numbers the compiler shows in the message below? What triggers this formatting?
>
> Error: This expression has type O/3119.dexpr = O/3119.decor * O/3119.expr
> but an expression was expected of type
> O/1730.dexpr = O/1730.decor * O/1730.expr
> Type O/3119.decor = O/3119.decor_fst * Static.t
> is not compatible with type O/1730.decor = O/1730.decor_fst * Static.t
> Type O/3119.decor_fst = Keep_defs.P.O.decor_fst
> is not compatible with type O/1730.decor_fst = Indirloc.t
>
> I'm asking this, because from time to time I deal with error messages like "type abc is not compatible with abc" with both abc being exactly the same strings. I'm wondering whether it is possible to force the compiler to say something more, to explain the difference between these types.
It is exactly what it does here:
it tells you that you have two versions of the module O, and that they
are incompatible because decor_fst has different definitions in these
two versions.
The output of numbers is triggered when the same identifier appears
twice for different entities.
So you should never have just "abc is not compatible with abc", as
the internal unique identifiers should be printed also.
Jacques Garrigue
next prev parent reply other threads:[~2012-06-06 16:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-06 10:04 Dawid Toton
2012-06-06 16:23 ` Jacques Garrigue [this message]
2012-06-12 14:40 ` [Caml-list] " Dawid Toton
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=90B44972-C96B-435E-9353-5CF4F845FEBF@math.nagoya-u.ac.jp \
--to=garrigue@math.nagoya-u.ac.jp \
--cc=caml-list@inria.fr \
--cc=d0@wp.pl \
/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