Skip to content

Instantly share code, notes, and snippets.

@SaitoAtsushi
Created January 29, 2014 10:01
Show Gist options
  • Save SaitoAtsushi/8684929 to your computer and use it in GitHub Desktop.
Save SaitoAtsushi/8684929 to your computer and use it in GitHub Desktop.
Ypsilon 0.9.6-trunk/r503 でエラーになるでよ
#!r6rs
(library (library-a)
(export with-library-a)
(import (rnrs) (library-accessor))
(define x 'library-a)
(define-accessor-for-outer-of-library with-library-a)
)
#!r6rs
(library (library-accessor)
(export define-accessor-for-outer-of-library)
(import (rnrs))
(define x 'library-accessor)
(define-syntax define-accessor-for-outer-of-library
(lambda(stx)
(syntax-case stx ()
((k name)
#'(define-syntax name
(lambda(stx)
(syntax-case stx ()
((_ p)
(datum->syntax #'k (syntax->datum #'p))))))))))
)
#!r6rs
(import (rnrs) (library-a))
(define x 'test)
(display (with-library-a x))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment