hello,
In R6RS code i have a module A (assignment) that needs a module B (set-values-plus) and B also needs module A. Should i put all code in the same module? or is there a way to solve this problem otherwise,because when i ran a test code using modules A and B it seems to goes in an infinite loop....
here is the headers containing the import of my modules for now:
set-values-plus.sls :
#!r6rs
(library (set-values-plus)
(export set!-values-plus
return-values
create-return-values
define-or/and-set!-values)
(import (rnrs base (6))
(Scheme+R6RS assignment))
assignment.sls :
#!r6rs
(library (assignment) ; R6RS
(export <- ->
← →
:= =:
<v v>
⇜ ⇝)
(import (rnrs base (6))
(for (rnrs base (6)) expand) ; import at expand phase (not run phase)
(for (rnrs syntax-case (6)) expand)
(for (only (rnrs io simple (6)) display newline) expand)
(for (Scheme+R6RS parse-square-brackets) expand) ; import at expand phase (not run phase)
(only (rnrs control (6)) when)
(only (srfi :1) first second third fourth fifth)
(only (srfi :13) string-set! string-copy!)
(srfi :25)
(only (srfi :43) vector-copy vector-copy!)
(srfi :69) ; hash table
(rename (flomat) (repeat repeat-flomat)
(shape shape-flomat)
(transpose transpose-flomat))
(Scheme+R6RS parse-square-brackets)
(Scheme+R6RS for_next_step)
(Scheme+R6RS array)
(Scheme+R6RS slice)
(Scheme+R6RS declare)
(Scheme+R6RS block)
(Scheme+R6RS def)
(Scheme+R6RS bracket-apply)
(Scheme+R6RS set-values-plus)
(Scheme+R6RS overload)
(only (racket match) match ==))
i add that i even checked the Guile version of the same code and all is working without the 'import':
(define-module (set-values-plus)
#:export (set!-values-plus
return-values
create-return-values))
idem for the Kawa version:
(define-library (set-values-plus) ; R7RS
(import (kawa base))
(export set!-values-plus
return-values
create-return-values)
no specific 'import' of the other module are required.