Re: Unbound row variable in #basic_bloc

Wolfgang Lux (lux@heidelbg.ibm.com)
Mon, 09 Jun 97 13:46:23 +0100

Message-Id: <9706091146.AA50181@idse.heidelbg.ibm.com>
To: Vyskocil Vladimir <vyskocil@math.unice.fr>
Subject: Re: Unbound row variable in #basic_bloc
In-Reply-To: (Your message of Fri, 06 Jun 97 17:23:42 O.)
<33982B7E.532E30C7@math.unice.fr>
Date: Mon, 09 Jun 97 13:46:23 +0100
From: Wolfgang Lux <lux@heidelbg.ibm.com>

> Bonjour,
> =

> J'ai pas trouve l'explication de ce message d'erreur dans la documentio=
n
> d'objective caml 1.05. Cela survient lorsque je fait :
> =

> type node_t=3D#basic_bloc
> =

> Si quelqu'un pouvait me donner des indications ?

Yes (sorry, it seems as if I should learn french real soon now, but =

until then you live with an english answer only :-).

Let us assume you has defined basic_bloc as follows:

class basic_bloc () =3D
method do_nothing =3D ()
end

then the types basic_bloc and #basic_bloc would be have been defined as =

follows:

basic_bloc =3D < do_nothing : unit >
#basic_bloc =3D < do_nothing : unit; .. >

Note the ellipsis ".." in the second. This is an anonymous row =

variable. (Row variables are used to describe and type extensible =

records, but in the implementation of Ocaml they are not available to =

user. Actually the only row variable you will ever encouter in Ocaml =

explicitly is the ellipsis ".."). Row variables, just like type =

variables must be bound somewhere, but if you try to define

type node_t =3D #basic_bloc

then ".." is unbound.

Regards
Wolfgang