[plt-scheme] simply-scheme / teachpacks can't overwrites an existing namespace symbol?

From: Danny Yoo (dyoo at hkn.eecs.berkeley.edu)
Date: Sat Feb 19 22:34:45 EST 2005

On Sat, 19 Feb 2005, Robby Findler wrote:

>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> You'll need to use a new language, if you want existing primitives to
> have new meanings. It should be matter of defining a module and then
> specifying it as a module in the info.ss file (see the PLT Tools manual
> for details).

Hi Robby,

Thank you; it's working wonderfully now, although I had to fiddle a little
randomly to get the drscheme-language-modules stuff to work.  I have a
preliminary .plt file here:


I need to polish it up, write some documentation, and, most importantly,
put a nice icon for the tool.  *grin* (By the way, thank you for writing
the earlier Simply Scheme teachpack!)

I think the teachpack documentation should specifically mention that
teachpacks can't override primitives, just so keep people (like me) from
following blind alleys.

There were two things I got snagged on during the conversion.  I'll
mention just so that perhaps the documentation on this can be improved.

    1.  It isn't completely clear by the PLT Tools documentation that each
sublist in drscheme-language-positions has to have at least two elements
in it.  I initially used a drscheme-language-positions value of:

(define drscheme-language-positions (list '("Simply Scheme")))

but then DrScheme reported the internal error:

   drscheme:language: languages position and numbers must be lists of
   strings and numbers, respectively, must have the same length, and must
   each contain at least two elements, got: ("Simply Scheme") (0)

The error message was obvious enough now --- a language needs to be in a
category --- but this means that the example EOPL module-language snippet
in the PLT Tools documentation here:


is broken and needs to be amended.

    2.  It also wasn't clear from the documentation that bin/setup-plt had
to be rerun before DrScheme would be able to see the package as a new
language.  I just went into my collects/simply-scheme directory and tried
adding 'info.ss'.  But to my frustration, DrScheme didn't see it until I
reran bin/setup-plt.

The documentation implies that DrScheme manually scans each info.ss at the
toplevel collects directory on startup, but this appears to be slightly
wrong.  It really appears to use some cached information that is collected
during collection compilation.  A mention about this in the docs will be

Thanks again for the help; I hope to get this all polished up in a few

Posted on the users mailing list.