Re: Unbound row variable in #basic_bloc

From: Wolfgang Lux (lux@heidelbg.ibm.com)
Date: Mon Jun 09 1997 - 14:46:23 MET DST


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=#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 () =
  method do_nothing = ()
end

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

   basic_bloc = < do_nothing : unit >
   #basic_bloc = < 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 = #basic_bloc

then ".." is unbound.

Regards
Wolfgang



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:11 MET