There are some incompatibilities between Guile and the R6RS. Some of them are intentional, some of them are bugs, and some are simply unimplemented features. Please let the Guile developers know if you find one that is not on this list.
libraryforms in one file are not yet supported. This is because the expansion of
librarysets the current module, but does not restore it. This is a bug.
R6RS behavior can be turned on via a reader option. See String Syntax, for more information.
set!to a variable transformer may only expand to an expression, not a definition—even if the original
set!expression was in definition context.
For example, while the expansion of the following set of toplevel definitions does the correct thing:
(begin (define even? (lambda (x) (or (= x 0) (odd? (- x 1))))) (define-syntax odd? (syntax-rules () ((odd? x) (not (even? x))))) (even? 10)) ⇒ #t
The same definitions outside of the
begin wrapper do not:
(define even? (lambda (x) (or (= x 0) (odd? (- x 1))))) (define-syntax odd? (syntax-rules () ((odd? x) (not (even? x))))) (even? 10) <unnamed port>:4:18: In procedure even?: <unnamed port>:4:18: Wrong type to apply: #<syntax-transformer odd?>
This is because when expanding the right-hand-side of
odd? is not yet marked as a syntax transformer, so
it is assumed to be a function.
This bug will only affect top-level programs, not code in
forms. Fixing it for toplevel forms seems doable, but tricky to
implement in a backward-compatible way. Suggestions and/or patches would
(rnrs io ports)module is incomplete. Work is ongoing to fix this.
equal?may fail to terminate when applied to arguments containing cycles.