Summary

require-extension has a hygiene problem

Metadata

Description

It appears that require-extension doesn't work if you've locally rebound QUOTE:

 alaric@ubuntu:~/personal/tmp$ cat test.scm 
 (let ((quote 1))
      (require-extension aes))
 alaric@ubuntu:~/personal/tmp$ csi -script test.scm
 
 Error: unbound variable: aes
 
 	Call history:
 
 	<syntax>	  (let ((quote 1)) (require-extension aes))
 	<syntax>	  (##core#let ((quote 1)) (require-extension aes))
 	<syntax>	  (##core#begin (##core#require-extension (aes) #t))
 	<syntax>	  (##core#require-extension (aes) #t)
 	<syntax>	  (##core#begin (##core#begin (##core#begin (##sys#require (quote aes))) (import aes)) (##core#undefin......
 	<syntax>	  (##core#begin (##core#begin (##sys#require (quote aes))) (import aes))
 	<syntax>	  (##core#begin (##sys#require (quote aes)))
 	<syntax>	  (##sys#require (quote aes))
 	<syntax>	  (quote aes)
 	<syntax>	  (import aes)
 	<syntax>	  (import scheme chicken foreign extras)
 	<syntax>	  (##core#undefined)
 	<syntax>	  (##core#undefined)
 	<syntax>	  (##core#undefined)
 	<eval>	  (##sys#require (quote aes))
 	<eval>	  (quote aes)	<--
 alaric@ubuntu:~/personal/tmp$ csc test.scm
 alaric@ubuntu:~/personal/tmp$ ./test 
 
 Error: unbound variable: aes
 
 	Call history:
 
 	quote0	  	<--

Changes and comments

[2011-09-23 14:58:31 UTC] alaric wrote:

FYI, I found this while trying to import only the identifiers I needed for something - see the annotation at http://paste.call-cc.org/paste?id=be84fd7f5049eee3f2bf3fa8a5f7efe936e49131#a1

[2011-09-26 08:58:47 UTC] felix wrote:

Yes, all expansions generated by `##sys#do-the-right-thing` use an unrenamed `quote`.

[2011-10-03 01:08:27 UTC] johnwcowan wrote:

It's really `quote` that has a hygiene problem, but Scheme is stuck with that for backward compatibility. In effect, `quote`, `quasiquote`, `unquote`, and `splicing-unquote` are absolute constants and should never be bound.

[2011-11-04 13:42:15 UTC] felix removed milestone 4.8.0

[2013-11-25 13:05:24 UTC] ckeen changed status from new to closed

[2013-11-25 13:05:24 UTC] ckeen set resolution to wontfix

[2013-11-25 13:05:24 UTC] ckeen wrote:

Due to the lack of interest for this I am marking the bug as WONTFIX.