scribble icon indicating copy to clipboard operation
scribble copied to clipboard

Fixed scribble bug #15 (Can't require a submodule in the same chunk with scribble/lp2)

Open SuzanneSoy opened this issue 9 years ago • 0 comments

This fixes bug #15.

The problem was that when analyzing a chunk, scribble/lp tries to identify the require statements and automatically append them to a (require (for-label …)) statement. Submodules declared in the chunks are not available during the first expansion step.

Ideally, we would simply ignore all unknown modules, as I'm not 100% sure this is robust in all cases.

Also, it would be nice to check whether we're in the first expansion step or in the actual module, and include these require statements with an extra ".." in the second case.

I also cleaned up code by currying the #'racketblock vs #'RACKETBLOCK parameter for chunk and CHUNK instead of factoring the two macros with define-syntax-rule. This avoids a lot of (... ...) in the code.

SuzanneSoy avatar Jun 17 '16 13:06 SuzanneSoy