Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SuzanneSoy opened this issue Aug 5, 2015 · 1 comment
Open

Comments

@SuzanneSoy
Copy link
Contributor

In the code below, the (require 'm) fails. Interestingly, it is possible to require m from a sibbling submodule works, but (require (submod "." m)) doesn't work.

#lang scribble/lp2

@chunk[<*>
       (module m racket
         (define x 1)
         (provide x))
       (require 'm)                 ;; Fails with "require: unknown module" module name: #<resolved-module-path:'m>
       (require (submod "." m))     ;; Fails with "require: unknown module" module name: #<resolved-module-path:(submod 'scribble-lp-tmp-name m)>
       (module other racket
         (require (submod ".." m))) ;; Works.
       ]
@SuzanneSoy
Copy link
Contributor Author

Wrapping the module m and the require with (begin (module m ...) (require 'm)) works fine. It feels like the names were not introduced in the same context, due to an overly-aggressive strip-context or replace-context in scribble/lp/lang/common.rkt, but I'm not sure.

#lang scribble/lp2

@chunk[<*>
       (begin
         (module m racket
           (define x 1)
           (provide x))
         (require 'm))] ;; Works.

SuzanneSoy added a commit to SuzanneSoy/hyper-literate that referenced this issue Jun 17, 2016
…cketblock vs RACKETBLOCK parameter for chunk and CHUNK instead of calling define-syntax-rule twice.
SuzanneSoy added a commit to SuzanneSoy/hyper-literate that referenced this issue Jun 17, 2016
…cketblock vs RACKETBLOCK parameter for chunk and CHUNK instead of calling define-syntax-rule twice.
SuzanneSoy added a commit to SuzanneSoy/hyper-literate that referenced this issue Jun 17, 2016
…cketblock vs RACKETBLOCK parameter for chunk and CHUNK instead of calling define-syntax-rule twice.
SuzanneSoy added a commit to SuzanneSoy/hyper-literate that referenced this issue Jun 17, 2016
…cketblock vs RACKETBLOCK parameter for chunk and CHUNK instead of calling define-syntax-rule twice.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant