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] Recursive type and class
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Frese <dfrese@d...>
Subject: [Caml-list] Recursive type and class
Hello folks,

I have a problem with mixing a class and a type recursively. Written
down directly, I want to have something like this:

type atype = Obj of aclass | I of int

class aclass = object
  val mutable field0 : atype = I 5

But this does not work, of course. Can anyone tell me, how this can be

Thanks, David.

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