On 7/13/20, Roman Klochkov <kalimehta...@gmail.com> wrote:
> I tried
> ```
> (define-syntax my-file
>   (make-require-transformer
>    (lambda (stx)
>      (syntax-case stx ()
>        [(_ path)
>         (printf "Importing: ~a~n" #'path)
>         (expand-import #'(file path))]))))
> (require (my-file "test.rkt"))
> ```
> with the same result: no errors in require, but no imports.
>
> So, it seems, that the only solution is datum->syntax. It works fine.

There is another way: syntax-local-introduce will remove the macro scope.

```
(define-syntax (req2 stx)
  (syntax-case stx ()
    [(_ (x y)) (syntax-local-introduce #'(require (x y)))]))
```

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAFUu9R563Pr8TZkJVBjFYZjf5LcCWfEezdJ1uKjhErp3-zpzAg%40mail.gmail.com.

Reply via email to