I agree that r6rs libraries are the Right Thing for Guile, and neither native modules nor R7RS libraries. There is no distinction between include and include-library-declarations in R6RS, as all that is allowed is a single export and a single import (with any number of libraries, of course) and the rest is code.If an R6RS doesn't have `include`, it is trivial to package this definition (from R6RS Libraries 12.6 s.v. datum->syntax) in an (include) library:(define-syntax include
(lambda (x)
(define read-file
(lambda (fn k)
(let ([p (open-file-input-port fn)])
(let f ([x (get-datum p)])
(if (eof-object? x)
(begin (close-port p) '())
(cons (datum->syntax k x)
(f (get-datum p))))))))
(syntax-case x ()
[(k filename)
(let ([fn (syntax->datum #'filename)])
(with-syntax ([(exp ...)
(read-file fn #'k)])
#'(begin exp ...)))])))John Cowan http://vrici.lojban.org/~cowan xxxxxx@ccil.org
Man has no body distinct from his soul, for that called body is a portion
of the soul discerned by the five senses, the chief inlets of the soul
in this age. --William Blake