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
Unbound row variable in #basic_bloc
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1997-06-10 (07:19)
From: Wolfgang Lux <lux@h...>
Subject: Re: Unbound row variable in #basic_bloc
> Bonjour,
> J'ai pas trouve l'explication de ce message d'erreur dans la documention
> 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 = ()

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

   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.