English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Exception Unix_error problem in toplevel
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-02-04 (00:56)
From: Bob Williams <a6b37331@t...>
Subject: Re: [Caml-list] Exception Unix_error problem in toplevel
On Sat, Feb 03, 2007 at 02:48:30PM +0100, ls-ocaml-developer-2006@m-e-leypold.de wrote:
> Bob Williams <a6b37331@telus.net> writes:
> > Now to the possible bug in toplevel.  According to section 6.8.2 of
> > the OCaml manual,
> >
> > 	exception Unix_error of ...
> >
> > simply declares another variant of the built-in variant type "exn".  I
> > haven't looked into the implementation of OCaml, but I assume the
> > compiler statically assigns a tag number to every variant of a normal
> > variant type.  For exn, however, the tag numbers must be assigned at
> > load time or run time.
> >
> > And that is the problem I stumbled over.  The second copy of
> Oh cool. :-). There should be RAQ (rarely asked questions + obscure
> problems). This should go into it :-).
> Regards -- Markus

They are all obscure, Markus.  A careful developer finds and fixes
most of the obvious bugs; the ones left over are nearly always

I did something stupid to trigger the exception-renumbering bug, but
there are valid circumstances under which the bug could bite somebody
else.  So it should probably be fixed.

I know almost nothing about OCaml's implementation, so any patch I
contribute will probably hurt more than it will help.  But if nobody
volunteers to fix the bug, I hereby threaten to do it myself.  :)