Re: [PATCH] Compile in a fresh module by default

2009-10-15 Thread Ludovic Courtès
Andy Wingo writes: > (define-syntax foo ...) > (load "file-that-needs-foo") > > The load needs to be done relative to the current module, which it is -- > unless it's autocompiling, in which case we go through the autocompile > case in boot-9.scm:924 (not the one in load.c), which is missing an >

Re: [PATCH] Compile in a fresh module by default

2009-10-15 Thread Andy Wingo
On Wed 14 Oct 2009 10:11, l...@gnu.org (Ludovic Courtès) writes: >> I ask because I'm working on a macro that transforms R6RS library >> expressions, which contain nested `define' calls, into Guile modules. >> My code rewrites these defines as location declarations that get >> exported as part of

Re: [PATCH] Compile in a fresh module by default

2009-10-14 Thread Ludovic Courtès
Hi Julian, Julian Graham writes: > Naive question (and I realize I'm a bit late here): What if there are > bindings in the current module that need to be present for expansion > and compilation to succeed? Just specify ‘(compile EXP #:env (current-module))’. This is what ‘repl-compile’ in ‘(sy

Re: [PATCH] Compile in a fresh module by default

2009-10-13 Thread Julian Graham
Hi Ludovic, Naive question (and I realize I'm a bit late here): What if there are bindings in the current module that need to be present for expansion and compilation to succeed? I ask because I'm working on a macro that transforms R6RS library expressions, which contain nested `define' calls, in

Re: [PATCH] Compile in a fresh module by default

2009-09-20 Thread Ludovic Courtès
Hello! l...@gnu.org (Ludovic Courtès) writes: > The attached patch makes `compile' and friends use fresh module rather > than the current module as the default compile-time environment. I committed a slightly modified version in 87c595c757b7db84ffdcfda96f736ab235e674a8. Thanks, Ludo’.

[PATCH] Compile in a fresh module by default

2009-08-17 Thread Ludovic Courtès
Hello Guilers! The attached patch makes `compile' and friends use fresh module rather than the current module as the default compile-time environment. The intent is to make sure macro definitions and side-effects made at expansion time do not (to some extents) clutter the current module's name sp