Date: Fri, 26 Sep 2008 00:24:39 +0200
From: =?iso-8859-1?Q?S=E9bastien?= Hinderer [EMAIL PROTECTED]
Is there a (clean) way to define simultaneously a class and a type that
are mutually recursive ?
Something like this :
class element (c : content) =
object
...
end and type
Dear list,
Is there a (clean) way to define simultaneously a class and a type that
are mutually recursive ?
Something like this :
class element (c : content) =
object
...
end and type content =
| Data of string
| Elements of element list;;
This is of course not a valid OCaml definition,
On Fri, 26 Sep 2008, Sébastien Hinderer wrote:
Dear list,
Is there a (clean) way to define simultaneously a class and a type that
are mutually recursive ?
I don't think so, but you don't have to.
Something like this :
class element (c : content) =
object
...
end and type content =
| Data