Deviation

Some of the behaviours are not compliant or deviate from other implementations. Here, we list some of them.

Macro expansion

The following code will print #t instead of #f with -r6command line option or doing it on a library:

(import (rnrs) (for (rnrs eval) expand))

(define-syntax foo
  (lambda(ctx)
    (syntax-case ctx ()
      ((_ id)
       (free-identifier=?
	#'id
	(eval '(datum->syntax #'k 'bar) (environment '(rnrs))))))))

(define bar)

(display (foo bar))

This is because, Sagittarius doesn't have separated phases of macro expansion and compilation. When foo is expanded, then the bar is not defined yet or at least it's not visible during the macro expansion. So, both _bar_s are not bound, then free-identifier=? will consider them the same identifiers.

Directives

On R6RS, symbol starts with #! is ignored, however this is not the case on R7RS. Sagittarius ignores these symbols on both mode.