[racket-dev] Is this legal submodule code?
I'm trying to wrap my head around submodules so I can get it working
with Whalesong, but I'm running into an issue:
#lang racket
(define (print-cake n)
#;(show " ~a " n #\.)
#;(show " .-~a-. " n #\|)
#;(show " | ~a | " n #\space)
(show "---~a---" n #\-))
(define (show fmt n ch)
(printf fmt (make-string n ch))
(newline))
(module* main2 #f
(print-cake 20)
(module* inner-main #f
(print-cake 20)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
I'm trying to understand what it means for the "name" of a module to
be a list, and I expect the name of the inner-main module to be (cake
main2 inner-main). Is that right?
But I see the following error message when trying to run this under DrRacket:
##########################################################
Welcome to DrRacket, version 5.2.901.1--2012-04-18(7279b02/g) [3m].
Language: racket.
. . local/racket/collects/errortrace/errortrace-lib.rkt:434:2:
standard-module-name-resolver: too many ".."s in submodule path:
(submod (quote cake) "..")
##########################################################
I don't know enough about submodules yet to know if this is a bug or
I'm just doing something wrong.