> On Sep 20, 2016, at 4:23 AM, Sourav Datta <[email protected]> wrote:
> 
> Is it possible to import an untyped class into typed Racket? I know how to 
> require for functions or structs but there seems to be no documentation about 
> classes. Thanks!



That is the break-though of Asumu’s addition. Here is a simple example, because 
I couldn’t find one in the docs: 

#lang racket

(module server racket
  (provide C%)

  (define C%
    (class object%
      (init-field world)
      (super-new)
      (define/public (hello)
        world))))

(module client typed/racket
  (require/typed (submod ".." server)
                 (C% (Class (init-field (world String)) (hello (-> String)))))
  (send (new C% [world "good bye"]) hello))

(require 'client)

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to