[plt-scheme] Scribble Problem in PLT Scheme 4.1.5

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sat Apr 25 12:00:01 EDT 2009

At Sat, 25 Apr 2009 09:53:35 -0600, Doug Williams wrote:
> Here is the message.
> PLaneT packager: Error generating scribble documentation:
> scribblings\sets.scrbl
> :128:2: item: illegal use of syntax in: (item (scheme #:fifo) "---" (scheme
> item
> ) " is inserted at the end of " (scheme set) ".  The " (scheme priority) ",
> if p
> rovided, is ignored.")

Oh, I see...

At Sat, 25 Apr 2009 09:46:49 -0600, Matthew Flatt wrote:
> > > >> > @defproc[(set-insert! (set set?) (item any/c) (priority real? 100))
> > > >> > any]{

The second argument is called `item'. Scribble originally didn't bind
argument names in the body of the `defproc'. Now it does, and that's
how `defproc' communicates to `scheme' so that [email protected][item]' gets
typeset as a formal argument.

Since `item' is bound by this use of `defproc', though, `item' doesn't
have its usual meaning in the body of the `defproc', and the uses of
`item' for `itemize' don't work.

The error message needs to be improved to say something like "illegal
use of a formal-argument name", and I'll work on that.

We try to avoid breaking compatibility with old files like this, but
there was no way around fixing the binding scopes.

To avoid this binding collisions, you have the usual options: you could
add `@(define real-item item)' at the top-level and use `real-item'
inside this particular `itemize', or you could change the formal
argument name `item' in the `defproc'.

Posted on the users mailing list.