picrin
picrin copied to clipboard
syntax-rules cannot generate symbol with quote syntax
It seems syntax-rules does not allow me to generate symbol... I do not investigate deeply this yet, but AFAIK, Picrin is the only Scheme implementation behave like this...
(import (scheme base)
(scheme write))
(define-syntax check
(syntax-rules ()
((_) 'hoge)))
(write (check)) (newline)
Yields #<identifier hoge>. Other Scheme should say hoge as symbol.
(In other words, we cannot use case with symbols within syntax-rules in Picrin.
(import (scheme base) (scheme write))
(define-syntax check
(syntax-rules ()
((_ arg)
(case arg
((OK) "OK\n")
(else "NG\n")))))
(display (check 'OK)) (newline)
ChezScheme, chibi-scheme, Gauche, Guile, Kawa, NMosh, Sagittarius says "OK", picrin says "NG".)
Verified. This issue will fixed in #347 .
That is a known issue (and an I-really-want-to-fix-but-failing thing). Given an issue report, I put a priority on fixing this bug. I don't expect it will be done in a short amount of time, though.