[racket-dev] submodules

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Fri Mar 9 14:09:00 EST 2012

What about specially treating the #:main keyword when it appears in a
module top-level. Everything that follows it gets wrapped in a
(module* main #f), perhaps with #:niam as an end delimiter. Or maybe
#:submodule <id>, if it appears at the top-level of a module could
mean that. Or maybe all new syntax:

#submodule <id> {
.... submodule body for <id> goes here ...


On Fri, Mar 9, 2012 at 12:04 PM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> At Wed, 7 Mar 2012 10:14:35 -0700, Matthew Flatt wrote:
>> I've added "submodules" to a version of Racket labeled v5.2.900.1
> Submodules are now pushed to the Racket git repo.
> I haven't yet added a syntactic form to simplify
>  (module* main #f
>   ....)
> My first idea was `main', as in
>  (main
>   ....)
> but that seems too quiet and likely to create collisions. (It does
> create a collision in part of the contract library, which imports
> `racket/base' for syntax and defines a for-syntax `main' function.)
> Jon suggests `submodule':
>  (submodule main
>   ...)
> This suggestion has the advantage of replacing all `(module* .... #f
> ....)' combinations, and mostly I like this direction. However,
> `submodule' would be only one way to define a "submodule", while
> `submod' in a module path corresponds to "submodule" in the more
> general sense. It could be that `submodule' is on the right path and
> other terminology should change, or maybe there's a more specific word
> to use for a `(module* .... #f ....)' replacement instead of `submodule'.
> _________________________
>  Racket Developers list:
>  http://lists.racket-lang.org/dev

Posted on the dev mailing list.