; vim: syntax=scheme (define R6RS-CORE "~/.gambit/r6rs.o1") (define R6RS-SYSTEM-CATALOGS '()) (define (r6rs . catalogs) (define (catalog->uri f) (make-uri 'file (path-expand f))) (load R6RS-CORE) (r6rs#register-catalogs! (append (map catalog->uri R6RS-SYSTEM-CATALOGS) (map catalog->uri catalogs)))) (define-macro (program options . body) (cond ((null? options) `(r6rs#run-r6rs-sequence ',body)) ((or (memq 'repl options) (memq 'interactive options)) `(ex:repl ',body)) (else (assertion-violation 'program "unknown options" options))))