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
[Caml-list] Mutually recursive types and classes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Nick Name <>
Subject: [Caml-list] Mutually recursive types and classes
Hi all,

I wish to declare a type like

type a = A of (b -> unit) | ...

where b is a class like

class b = 
object (this)
	method f : a -> unit = 
		  A f -> f this
                | _ -> unit

or, alternatively:

class b =
   inherit [a] otherclass

How can I do such a thing, considering that I can't write an "and"
keyword between a type declaration and a class (or class type)

Thanks for help


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: