I am trying to write something that works both in DrRacket / plt-r5rs and in Gambit / gsi.
The problem I encountered is that (load "foo.scm")in Gambit it does not load define-syntax-blocks. Use (include "foo.scm")in Gambit works, but of course leads to a syntax error in DrRacket.
Is there any way to solve this problem to write portable R5RS code?
Things I tried:
- Override
(include "foo.scm")to (load "foo.scm")and vice versa. Problem: Invalid overriding macros in Gambit. - Wrapping specified overrides in
(if gambit ...). Problem: It is incorrect to define inside if if (unless otherwise specified inside). - Pass a string with the file name to include in the library file. Problem: The inclusion in the Gambit seems to occur before the interpretation begins.
source
share