Version française
Home     About     Download     Resources     Contact us    
Browse thread
type and class definition : recursion
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: pbrisset@e...
Subject: type and class definition : recursion


Hello,

I would like to define a class and a type with a mutual recursion between
them. Something like

	type t = A
	       | B of c
	and class c (x:t) =
          val mutable value = x
	end

Is it possible with O'caml ?

--------------
Pascal Brisset
ENAC, 7 avenue Edouard Belin, BP 4005, F-31055 Toulouse Cedex, France
Tel: +33 62 17 40 53, E-mail: pbrisset@eis.enac.dgac.fr, Fax: +33 62 17 41 43