[racket] Submodules can't be imported in same file?
The following approach works for me. Would that do what you need?
;; ----- mod.rkt -----
#lang racket
(module private racket
(define (secret)
'foo)
(provide secret))
(require 'private)
(define (wrapper)
(secret))
(provide (all-defined-out))
;; Note that all-defined-out will not provide stuff from 'private.
;; For that to happen, you would need to use (require (all-from-out
;; 'private)). So ... don't do that.
;; ----- use-mod.rkt -----
#lang racket
(require "mod.rkt")
(wrapper) ;; => 'foo
(secret) ;; => error -- as desired