Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: -- (:)
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, wrote:
> Bob Williams <> 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.  :)