#lang racket ;; ;; Hi all (Matthew in particular I imagine :-) ), ;; ;; Why does option (C) work, but options (A) and (B) do not? ;; ;; They fail with: ;; ;; t.rkt:31:2: v1: unbound identifier in module ;; in: v1 ;; context...: ;; standard-module-name-resolver ;; ;; -- Tony
(require racket/require-syntax) ;;------------------------------(A)------------------------------ ;; (define-require-syntax m+ ;; (syntax-rules () ;; [(_ xs ...) ;; (submod ".." xs ...)])) ;;------------------------------(B)------------------------------ ;; (define-require-syntax (m+ stx) ;; (syntax-case stx () ;; [(_ xs ...) ;; #'(submod ".." xs ...)])) ;;------------------------------(C)------------------------------ (define-require-syntax (m+ stx) (syntax-case stx () [(_ xs ...) (datum->syntax stx (list* 'submod ".." #'(xs ...)))])) (module+ m1 (provide v1) (define v1 123)) (module+ main (require (m+ m1)) v1) -- 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. For more options, visit https://groups.google.com/d/optout.