From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 0978D7ED26 for ; Wed, 6 Jun 2012 18:21:07 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap0EAA6Dz0+FBoIF/2dsb2JhbABFtTyCGAEBBAFAAwE1AQEDCwsOOFcGiBkEpEOENAGGE4h9AQaQUWCIQYxfj3qCbw X-IronPort-AV: E=Sophos;i="4.75,725,1330902000"; d="scan'208";a="146798836" Received: from rabbit.math.nagoya-u.ac.jp (HELO mailhost.math.nagoya-u.ac.jp) ([133.6.130.5]) by mail4-smtp-sop.national.inria.fr with ESMTP; 06 Jun 2012 18:20:39 +0200 Received: from mailhost.math.nagoya-u.ac.jp (localhost [127.0.0.1]) by mailhost.math.nagoya-u.ac.jp (Postfix) with ESMTP id 9FBE06324; Thu, 7 Jun 2012 01:20:35 +0900 (JST) Received: from mailhost.math.nagoya-u.ac.jp (camel-172.math.nagoya-u.ac.jp [172.16.254.4]) by mailhost.math.nagoya-u.ac.jp (Postfix) with ESMTP id 6A2FA24DD; Thu, 7 Jun 2012 01:20:35 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=math.nagoya-u.ac.jp; h= subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=alpha; bh=JOCOgu4PeSK//dL+7ZFbErGsN3s=; b=jX1V3goe8qp0aIQeapRCJWmTYQKS QQT1Qw3qcujxrvOrw8VsHYN+Kai/h3U22IN3KCR/5mEL7bD3EfZlZzkTm2YDWX3C PvWwYcEMJnX4GZp5TWnyKd2nY074qsYERPB36urp5zdA8KZ9SZGi+1thpvMFmGiF FsUlxK6+2OrM470= DomainKey-Signature: a=rsa-sha1; h=Received:Subject:Mime-Version:Content-Type:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; b=F3xi2R/e0Cc7DsTZ4aFXRxp69LX5CTJc5TuoP7o+6dWX7jCZT0Qmp8HhN9udwGV8mcdQpMV5ZRPr1DptB44l+WnkQDGYLOViVko3HCzwllXZq3exef3wFlLmsgVBCF5yCYJsDa8vcs554lCCHiqEE/4modB/Snh4awFfIlrsJoM=; c=nofws; d=math.nagoya-u.ac.jp; q=dns; s=alpha Received: from garrigue-mini.math.nagoya-u.ac.jp (garrigue-mini.math.nagoya-u.ac.jp [172.16.30.37]) by mailhost.math.nagoya-u.ac.jp (Postfix) with ESMTP id F298940D7; Thu, 7 Jun 2012 01:20:34 +0900 (JST) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=iso-8859-1 From: Jacques Garrigue In-Reply-To: <4FCF2B1F.4050902@wp.pl> Date: Thu, 7 Jun 2012 01:23:52 +0900 Cc: caml-list@inria.fr Content-Transfer-Encoding: quoted-printable Message-Id: <90B44972-C96B-435E-9353-5CF4F845FEBF@math.nagoya-u.ac.jp> References: <4FCF2B1F.4050902@wp.pl> To: Dawid Toton X-Mailer: Apple Mail (2.1278) Subject: Re: [Caml-list] Numbered modules in error messages On 2012/06/06, at 19:04, Dawid Toton wrote: > Is it possible to make use of the numbers the compiler shows in the messa= ge below? What triggers this formatting? >=20 > Error: This expression has type O/3119.dexpr =3D O/3119.decor * O/3119.ex= pr > but an expression was expected of type > O/1730.dexpr =3D O/1730.decor * O/1730.expr > Type O/3119.decor =3D O/3119.decor_fst * Static.t > is not compatible with type O/1730.decor =3D O/1730.decor_fst * Sta= tic.t > Type O/3119.decor_fst =3D Keep_defs.P.O.decor_fst > is not compatible with type O/1730.decor_fst =3D Indirloc.t >=20 > I'm asking this, because from time to time I deal with error messages lik= e "type abc is not compatible with abc" with both abc being exactly the sam= e strings. I'm wondering whether it is possible to force the compiler to sa= y 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=