caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Unbound row variable in #basic_bloc
@ 1997-06-06 15:23 Vyskocil Vladimir
  1997-06-09  8:59 ` Jerome Vouillon
  1997-06-09 12:46 ` Wolfgang Lux
  0 siblings, 2 replies; 3+ messages in thread
From: Vyskocil Vladimir @ 1997-06-06 15:23 UTC (permalink / raw)
  To: Caml list

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 ?

-- 
Vyskocil Vladimir
vyskocil@math.unice.fr
http://www.inria.fr/safir/WHOSWHO/Vladimir.html





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Unbound row variable in #basic_bloc
  1997-06-06 15:23 Unbound row variable in #basic_bloc Vyskocil Vladimir
@ 1997-06-09  8:59 ` Jerome Vouillon
  1997-06-09 12:46 ` Wolfgang Lux
  1 sibling, 0 replies; 3+ messages in thread
From: Jerome Vouillon @ 1997-06-09  8:59 UTC (permalink / raw)
  To: Vyskocil Vladimir; +Cc: Caml list


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 ?

    Cette erreur est similaire a l'erreur "Unbound type parameter 'a" 
que l'on obtient lorsque le second membre d'une definition de type
contient des variables de types libres (par exemple : type t = 'a). 

    Plus precisement, l'abreviation #basic_bloc s'expanse en un type
d'objet "ouvert"  < m_i : t_i; .. >. Dans ce type, les points
d'expansions representent en fait une variable de type, appelee "row
variable". Cette variable est un parametre implicite de l'abreviation
#basic_bloc. Comme elle n'apparait pas en parametre du constructeur
node_t dans la definition de type "type node_t=#basic_block", une
erreur est produite.

    Le terme "row variable" n'apparait effectivement nulle part dans
le manuel... Je vais le rajouter.

-- Jerome Vouillon





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Unbound row variable in #basic_bloc
  1997-06-06 15:23 Unbound row variable in #basic_bloc Vyskocil Vladimir
  1997-06-09  8:59 ` Jerome Vouillon
@ 1997-06-09 12:46 ` Wolfgang Lux
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Lux @ 1997-06-09 12:46 UTC (permalink / raw)
  To: Vyskocil Vladimir; +Cc: Caml list

> 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 = ()
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






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1997-06-12  8:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-06-06 15:23 Unbound row variable in #basic_bloc Vyskocil Vladimir
1997-06-09  8:59 ` Jerome Vouillon
1997-06-09 12:46 ` Wolfgang Lux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).