Are you referring to section 6.3, which defines modules as individual s-expressions?
It appears to me that this code would work fine if specified in the style shown earlier in section 6.1, where each module appears in its own file, begins with a #lang declaration, and the one referred to the other one using the name of the file in quotes. This would match the most common case of code development, where each module is contained in its own file.
However, you can certainly put both of them into one buffer, if that’s actually what you want. Use a #lang declaration at the top to implicitly wrap the whole file in a single module, making these two submodules, like this:
#lang racket
(module increment racket
(provide increment)
; increment : exact-integer? -> exact-integer?
(define (increment x) "this is broken"))
(module client typed/racket
(require/typed (submod ".." increment) [increment (-> Integer Integer)])
(increment 5))
(require ‘client)
Honestly, though, I would urge you to adopt the two-files style unless you have a really compelling reason not to.
John
> --
> 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
racket-users...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/racket-users/dfc48fe3-10e9-0461-89e7-51a03a6207e5%40rickmurphy.org.