[racket] Splitting Racket source code by scope?

From: Danny Yoo (dyoo at cs.wpi.edu)
Date: Wed Feb 29 18:21:46 EST 2012

Hi Rüdiger,

The top of all four files should have

   #lang racket

at the very top.  This declares the file to be a module in the full
Racket language.  Other documentation out there that are a few years
old might refer to the older style of defining modules, where there's
an outer "(module foo mzscheme ...)", which "#lang racket" supercedes.


About your point 2 about having to change the require paths: This is
odd: you shouldn't have to do that.


It may be that your copy-and-paste might have failed in some way.

Here, let me zip up the files for you.  I've put them temporarily at:

    http://hashcollision.org/tmp/units.zip


To run the example in:

    http://docs.racket-lang.org/guide/Invoking_Units.html

Go and open DrRacket.  In DrRacket, Open the simple-factory-unit.rkt file.

Press Run, which will run the program and allow you to experiment interactively.

Once the program has run, type at the Interactions window at the
bottom half of the window:

    (invoke-unit simple-factory@)

and press Enter.


Let's make sure that this works: if you hit any problems, let us know!


Posted on the users mailing list.