[racket] playing with upcoming racket 5.3 submodules feature

From: Danny Yoo (dyoo at cs.wpi.edu)
Date: Wed Apr 18 20:19:40 EDT 2012

I'm playing around with submodules with a small toy program:

    https://gist.github.com/2417377


Submodules are neat!  In particular, it includes several submodules
for different roles.

  1. We can require this as a regular library.  Under this, it just
exposes 'solve'.

  2.  When run directly, the 'main' submodule executes, so it looks
like a regular command-line program.

  3.  When applied with 'raco test', it runs the test cases.

  4.  We can make submodules that expose everything (forgive me,
Parnas).  In the case above, the 'all' submodule exposes the
internals.


I'm looking really forward to 5.3: at the very least, it codifies what
it means to run a module under named contexts, and thank goodness
'test' is an official context.

Posted on the users mailing list.