On May 2, 2014, at 9:24 PM, dfel...@ccs.neu.edu wrote:

> #:implements should be used inside of a Class type form.
> 
> The following is an example from the documentation:
> 
>> (define-type Point<%> (Class (field [x Real] [y Real])))
>> (: colored-point% (Class #:implements Point<%>
>                           (field [color String])))
I tried this:
#lang typed/racket

(module untyped racket
  (provide point% colored-point%)
  (define point%
    (class object% (super-new) (inspect #f)
      (init-field x y)))
  (define colored-point%
    (class point% (super-new) (inspect #f)
      (init-field color))))

(define-type Point<%> (Class (field [x Real] [y Real])))
(require/typed (submod "." untyped)
               [colored-point% (Class #:implements Point<%>
                                      (field [color String]))])
And it gave me this error:
. Type Checker: not a valid type: #:implements in: #:implements


____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to