Message-Id: <199909241218.OAA19643@ventoux.lip6.fr>
To: caml-list@inria.fr
Subject: Re: Tree of a certain class:
In-Reply-To: Your message of "Fri, 24 Sep 1999 10:15:52 +0200."
<37EB3338.4E226250@unibw-muenchen.de>
Date: Fri, 24 Sep 1999 14:18:54 +0200
From: "Sylvain BOULM'E" <Sylvain.Boulme@lip6.fr>
Hello,
Actually, #debug is an abbrevation for
<method debug : unit; ..>
where ".." is a row type variable, you may imagine as universally quantified.
And methods of a class are not allowed to be polymorphic. Only classes are.
So, you have to bound this row variable to a type parameter of the class.
* So a general solution is :
class ['a] dtree =
object
constraint 'a=#debug
inherit ['a] ctree
end
* But if you want only a "debug tree", you may write :
class dtree =
object
inherit [debug] ctree
end
Regards,
Sylvain.
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:25 MET