How can I create a library called rnrs-modified which will make the following code display "Hello, world!"...?
#!r6rs
(import (rnrs-modified))
(display set!)
or even this would be good (arguably better, actually):
#!r6rs
(import (rnrs) (modified)) ;or (import (modified) (rnrs))
(display set!)
Essentially I want to be able to redefine syntactic keywords (let, lambda, set!, etc) in a library, and then import that library into another library or a top-level program and use those redefined keywords.
However I keep getting this:
module: identifier already imported from a different source in:
set!
(lib "rnrs/main.ss")
(lib "rnrs-modified/main.ss")
The code I'm using for rnrs-modified is:
#!r6rs
(library (rnrs-modified)
(export (rename (f set!)))
(import (rnrs))
(define f "Hello, world!"))
Any ideas?
Update: I found this for 'mzscheme modules'. It's not for r6rs scheme, but the functionality it offers is basically exactly what I'm looking for. How can I do provide all-from-except
in r6rs scheme?