caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Guillaume Yziquel <guillaume.yziquel@citycable.ch>
To: Alain Frisch <alain@frisch.fr>
Cc: David Allsopp <dra-news@metastack.com>,
	Jim Pryor <lists+caml@jimpryor.net>,
	caml-list@inria.fr
Subject: Re: [Caml-list] Magic with fun (type t) ... ?
Date: Fri, 28 Jan 2011 00:56:49 +0100	[thread overview]
Message-ID: <20110127235649.GD4195@localhost> (raw)
In-Reply-To: <4D410D16.1050700@frisch.fr>

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 <abstr> 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


  reply	other threads:[~2011-01-27 23:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-26 22:17 Jim Pryor
2011-01-26 22:33 ` David Allsopp
2011-01-27  6:13   ` Alain Frisch
2011-01-27 23:56     ` Guillaume Yziquel [this message]
2011-01-26 22:34 ` Jim Pryor
2011-01-26 23:07 ` Guillaume Yziquel
2011-01-26 23:11 ` Gabriel Scherer

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=20110127235649.GD4195@localhost \
    --to=guillaume.yziquel@citycable.ch \
    --cc=alain@frisch.fr \
    --cc=caml-list@inria.fr \
    --cc=dra-news@metastack.com \
    --cc=lists+caml@jimpryor.net \
    /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;
as well as URLs for NNTP newsgroup(s).