Suppose I have the following typed class:
(define parent% (class object% #:forall (a) (super-new) (: show-me (-> a Void)) (define/public (show-me x) (displayln x))))
What is the best way to say that a class with the type variable
a is the subclass of
(inst parent% a)?
The following complains that
a is unbound:
(define child% (class (inst parent% a) #:forall (a) (super-new)))
The following typechecks:
(define child% (class (inst parent%) (super-new)))
(inst parent%) is the same thing as
(inst parent% Any), it's not exactly what I am looking for. I think I can live with it for now, but I wonder whether there is a better way to achieve parameterized inheritance.