[racket-dev] Fix to module reader?

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Wed Apr 3 07:51:36 EDT 2013

The patch looks obviously correct to me, in that it doesn't do
anything bad. I don't know enough about the code to know if the bad
pos should be dealt with some other way, though.

In general, if you want to add a "test" to DrDr, all you do is commit
the file somewhere. I'd put that file in something like


On Fri, Mar 29, 2013 at 1:28 PM, Danny Yoo <dyoo at hashcollision.org> wrote:
> I'm running into an internal error with the syntax/module-reader
> library with the given test program, and wanted to double check with
> someone else before committing the fix upstream.
> The test file is:
>     https://gist.github.com/dyoo/5272982
> When I run this under an unpatched module reader, I see the following error:
> 128-110-73-138:Desktop dyoo$ raco test prepend-lang-line.rkt
> testing prepend-lang-line.rkt
> -: contract violation
>   expected: number?
>   given: #f
>   argument position: 2nd
>   other arguments...:
>    16
>   context...:
>    /Applications/Racket
> v5.3.2/collects/syntax/module-reader.rkt:173:2: wrap-internal
>    wrap-internal/wrapper
>    /Users/dyoo/Desktop/prepend-lang-line.rkt: [running body]
>    /Applications/Racket v5.3.2/collects/compiler/commands/test.rkt:
> [running body]
>    /Applications/Racket v5.3.2/collects/raco/raco.rkt: [running body]
>    /Applications/Racket v5.3.2/collects/raco/main.rkt: [running body]
> My proposed patch is:
> https://github.com/dyoo/racket/commit/9322570e3e0210b99ec8a85dca52b62b4dde66fd
> Does this look ok?  Also, if I do push this upstream, how do I attach
> my test file so it gets run as part of the DrDr regression suite?
> _________________________
>   Racket Developers list:
>   http://lists.racket-lang.org/dev

Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University

"The glory of God is Intelligence" - D&C 93

Posted on the dev mailing list.