Re: include can't work

2013-11-18 Thread Nala Ginrut
On Mon, 2013-11-18 at 13:15 -0500, Mark H Weaver wrote: > Mark H Weaver writes: > > 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"? >

Re: include can't work

2013-11-18 Thread Mark H Weaver
Mark H Weaver writes: > 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"? It occurs to me that this might be caused by one of your Guile c

Re: include can't work

2013-11-18 Thread Mark H Weaver
Nala Ginrut 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

Re: include can't work

2013-11-17 Thread Nala Ginrut
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 ca

Re: include can't work

2013-11-17 Thread Mark H Weaver
l...@gnu.org (Ludovic Courtès) writes: > Mark H Weaver skribis: > >> Here's a patch to improve the error message. >> I'll push it to stable-2.0 if there are no objections. > > Looks good to me, but s/pathname/file name/? Okay, I made that change and pushed it to stable-2.0. Thanks, Ma

Re: include can't work

2013-11-17 Thread Ludovic Courtès
Mark H Weaver skribis: > Mark H Weaver writes: >> Obviously the error message should be improved, but the upshot is this: >> if you want to use 'include' from the REPL, or from some other port with >> no associated filename, then you must pass it an absolute pathname. > > Here's a patch to impro

Re: include can't work

2013-11-17 Thread Mark H Weaver
Nala Ginrut writes: > 2013-11-17 AM11:19 "Mark H Weaver" : >> When you're at the REPL, why not just use 'load' instead? > > Thanks for the explain, but it's not used in a REPL. I just used the > REPL to explain the issue. In that case, can you tell us where the 'include' macro was used? > Rack

Re: include can't work

2013-11-17 Thread Nala Ginrut
2013-11-17 AM11:19 "Mark H Weaver" : > When you're at the REPL, why not just use 'load' instead? Thanks for the explain, but it's not used in a REPL. I just used the REPL to explain the issue. Racket's "include" support relative path, so I made the mistake. > > Thoughts? > >Mark

Re: include can't work

2013-11-16 Thread Mark H Weaver
Mark H Weaver writes: > Obviously the error message should be improved, but the upshot is this: > if you want to use 'include' from the REPL, or from some other port with > no associated filename, then you must pass it an absolute pathname. Here's a patch to improve the error message. I'll push i

Re: include can't work

2013-11-16 Thread Mark H Weaver
Nala Ginrut writes: > I encountered a bug while trying include some file: > --cut > scheme@(guile-user)> (include "aa.scm") > While compiling expression: > ERROR: In procedure string-length: Wrong type argument in position 1 > (expecting string): #f

Re: include can't work

2013-11-15 Thread Daniel Llorens
> Date: Fri, 15 Nov 2013 15:40:47 +0800 > From: Nala Ginrut > I encountered a bug while trying include some file: > --cut > scheme@(guile-user)> (include "aa.scm") > While compiling expression: > ERROR: In procedure string-length: Wrong type argume