gerbil
gerbil copied to clipboard
Nested syntax makes unintern?
Three files + the build. The results fail with:
invoke gsc (gsc -:i8,f8,-8,t8 -debug-environments ~/.gerbil/lib/test-uep$bar__rt.scm) *** ERROR IN std/misc/concurrent-plan#perform-plan/threads__% -- Failure to build "test-uep" "Cannot compile module with uninterned id"
Help! :)
test-dep.ss
(export #t)
(defsyntax (define-endpoint stx)
(syntax-case stx ()
((macro id)
(with-syntax ((n (datum->syntax #'macro 'bar)))
#'(module n (export id) (def id 1))))))
test-jep.ss
(export #t)
(import ./test-dep)
(defsyntax (define-json-endpoint stx)
(syntax-case stx ()
((macro id) #'(begin (define-endpoint name)))))
test-uep.ss
(import ./test-jep)
(define-json-endpoint foo)
And the build ./test-build.ss
#!/usr/bin/env gxi
(import :std/build-script)
(defbuild-script
'("test-dep" "test-uep" "test-jep")
verbose: 10
static: #t)`
NOTE: It works without the "nest"
test-work.ss:
(import ./test-dep)
(define-endpoint foo )