Nala Ginrut <nalagin...@gmail.com> writes: > On Sun, 2013-11-17 at 05:09 -0500, Mark H Weaver wrote: >> Guile's 'include' also supports relative paths if the (include "...") >> form is found within a file, or more generally, if it was read from a >> port that had its filename set. >> >> Please tell us more about what you were doing, so that we can find out >> what's going wrong. >> > > I think it's a common situation. I planed to include b.scm into a.scm, > like: > -----------------a.scm-------------------- > (define-syntax define-primitive > ......) > (include "b.scm") > -----------------end---------------------- > > And let b.scm contains all the primitives definitions, which is > explicitly for later extending. > -----------------b.scm------------------- > (define-primitive %halt 0 0) > (define-primitive pair? 1 1) > (define-primitive cons 2 2) > ...... > ------------------end--------------------
This should work if "a.scm" and "b.scm" are files in the same directory. It works for me. I'm unable to reproduce the problem you're seeing. Can you help me to reproduce it? How are you loading "a.scm"? Thanks, Mark