[plt-scheme] (require... ) expanded from a macro
Hi,
I'm trying to port some of my software to PLT. I thought I could
emulate SRFI-55 using
(define-syntax require-extension
(lambda (stx)
(syntax-case stx (srfi)
((_ (srfi n))
(with-syntax ((nstr (string-append
(number->string
(syntax-object->datum (syntax
n))) ".ss")))
(syntax (require (lib nstr "srfi"))))))))
but it doesn't seem to work:
Language: Textual (MzScheme, includes R5RS).
> (require-extension (srfi 100))
;; it does look for a file
open-input-file: cannot open input file:
"/opt/plt/collects/srfi/100.ss" (No such file or directory; errno=2)
;; every is not pre-defined
> every
. reference to undefined identifier: every
;; seems to load without errors, but ...
> (require-extension (srfi 1))
> every
. reference to undefined identifier: every
> (require (lib "1.ss" "srfi"))
> every
#<procedure:every>
>
Aside from the surprising decision to exclude SRFI-0 and SRFI-55 from
PLT, why does this not work?
-- Dan Muresan