[racket] provide and require in submodules
Dear list members,
This works in DrRacket:
definitions window
-------------------------
#lang racket
(module+ server
(provide a-from-server)
(define a-from-server 'a-from-server))
(module+ client
(module server2 racket
(provide b-from-server2)
(define b-from-server2 'b-from-server2))
(require (submod ".." server))
(provide (all-from-out (submod ".." server)))
(require 'server2)
(provide (all-from-out (submod "." server2))))
(module+ main
(require (submod ".." client))
a-from-server
b-from-server2)
Results in interactions window
---------------
>
'a-from-server
'b-from-server2
BUT the following gives me the error: "all-from-out: no corresponding
require in: (quote server2)"
Could someone explain why I'm getting this error.
Definitions window
------------------
#lang racket
(module+ server
(provide a-from-server)
(define a-from-server 'a-from-server))
(module+ client
(module server2 racket
(provide b-from-server2)
(define b-from-server2 'b-from-server2))
(require (submod ".." server))
(provide (all-from-out (submod ".." server)))
(require 'server2)
(provide (all-from-out 'server2))) ;;;CHANGED (submod "." server2) TO
'server2
(module+ main
(require (submod ".." client))
a-from-server
b-from-server2)
Thanks,
Harry Spier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121120/cdddd8d4/attachment.html>