I can easily require a r6rs library file in the same directory from a Racket program:
a1.rkt:
#lang racket
(require "b2.rkt")
(foo)
a2.rkt:
#!r6rs
(library (a2)
(export foo)
(import (rnrs))
(define (foo)
"hello, this is foo"))
$ racket a1.rkt
"hello, this is foo"
Now I want to import a second r6rs library from my first one:
b1.rkt:
#lang racket
(require "b2.rkt")
(foo)
b2.rkt:
#!r6rs
(library (b2)
(export foo)
(import (rnrs) ???)
(define (foo)
(bar)))
b3.rkt:
#!r6rs
(library (b3)
(export bar)
(import (rnrs))
(define (bar)
"hello, this is bar"))
Looking at 5 Libraries and Collections it appears that all valid r6rs library names reference a directory path, so maybe the best I can do is put b3.rkt
in a subdirectory?
b2.rkt:
#!r6rs
(library (b2)
(export foo)
(import (rnrs) (b b3))
(define (foo)
(bar)))
Moving b3.rkt
into a subdirectory b
, I can use:
racket -S . b1.rkt
and that works.