From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p0RNwdB1023163 for ; Fri, 28 Jan 2011 00:58:39 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoAEAM6VQU1V2gB5b2dsb2JhbAClEgEMCwkZJIgrtC8NhUIEkAY X-IronPort-AV: E=Sophos;i="4.60,387,1291590000"; d="scan'208";a="74442410" Received: from emailfrontal2.citycable.ch ([85.218.0.121]) by mail3-smtp-sop.national.inria.fr with SMTP; 28 Jan 2011 00:58:34 +0100 X-Alinto-smtpauth-localdomain: Yes Received: from seldon (unknown [85.218.92.99]) (Authenticated sender: guillaume.yziquel@citycable.ch) by emailfrontal2.citycable.ch (Postfix) with ESMTPA id 784A48343CF; Fri, 28 Jan 2011 00:58:32 +0100 (CET) Received: from yziquel by seldon with local (Exim 4.72) (envelope-from ) id 1Pibhq-0005kY-3D; Fri, 28 Jan 2011 00:56:50 +0100 Date: Fri, 28 Jan 2011 00:56:49 +0100 From: Guillaume Yziquel To: Alain Frisch Cc: David Allsopp , Jim Pryor , caml-list@inria.fr Message-ID: <20110127235649.GD4195@localhost> References: <20110126221756.GA5907@vaio.jimpryor.net> <4D410D16.1050700@frisch.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <4D410D16.1050700@frisch.fr> User-Agent: Mutt/1.5.20 (2009-06-14) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p0RNwdB1023163 Subject: Re: [Caml-list] Magic with fun (type t) ... ? Le Thursday 27 Jan 2011 à 07:13:42 (+0100), Alain Frisch a écrit : > > There are two distinct problems here, neither of which has been > introduced in 3.12. > > First, the toplevel uses types to display exception arguments only > when it knows exactly their type. Otherwise, there is a fallback > heuristic to look at runtime tags. But how does the toplevel determines types? My exception type was perfectly declared and available in the .cmi file. Yet, before 3.12 I got the or similar displayed in the toplevel, and in 3.12 it started segfaulting. I'm simply wondering whether or not the heuristic gets triggered more easily in 3.12 than it was before. It's just a gut feeling. Nothing I can prove. > Second, exception values values are compared structurally; this > means that the constructors are compared textually and when they > match, the arguments are compared even if they don't have the same > type (yes, this can probably yield to segfaults). My segfault wasn't about comparing two exceptions using generic comparison, but merely not being able to display it in 3.12's toplevel. > Cf: > http://caml.inria.fr/mantis/view.php?id=1248 > http://caml.inria.fr/mantis/view.php?id=4531 > http://caml.inria.fr/mantis/view.php?id=4765 > http://caml.inria.fr/mantis/view.php?id=5087 Thanks for the background info. -- Guillaume Yziquel