[racket] Submodules can't be imported in same file?

From: Sean Kanaley (skanaley at gmail.com)
Date: Fri Sep 5 15:14:44 EDT 2014

Hello,

For ease of exporting wrapper functions I am trying to do something like

#lang racket

<class system stuff to wrap>

(module wrap racket or module+ wrap
  (provide (all-defined-out))
  <plain function wrappers>)

(require 'wrap)
(provide (all-from-out 'wrap))

With (module wrap racket ...), (require 'wrap) works but the stuff to be
wrapped isn't visible in the module, which is what the module+ form is for,
but then there doesn't seem to be a way to require wrap then. It seems to
require REPL or another file using (submod "<file>" wrap).

Obviously I can just split the code into two files in the first place, but
then what was the intended use for modules or submodules vs. just plain
files?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140905/07798dec/attachment.html>

Posted on the users mailing list.