Re: Should letrec via syntax work within eval-when (expand load eval)?

2019-08-05 Thread Rob Browning
Mark H Weaver writes: > The 'letrec' form above is indeed invalid. As the R5RS states: > > One restriction on 'letrec' is very important: it must be possible > to evaluate each without assigning or referring to the value > of any . If this restriction is violated, then it is an

Re: Should an enclosing let keep the compiler from handling define-module?

2019-08-05 Thread Rob Browning
Mark H Weaver writes: > It seems misguided to try to use Scheme code to temporarily switch the > current language to Scheme. Doesn't this approach presuppose that > Scheme is already the current language? Or one that's "sufficiently similar". I think in part I was originally confused because I

Re: Now crashing [was Re: guile-2.9.2 and threading

2019-08-05 Thread Mark H Weaver
Hi Linas, Linas Vepstas writes: > However -- if one does call `scm_error` fairly rapidly, from multiple > threads, one will eventually hit a race condition and get a crash. If you could produce a small, self-contained example demonstrating this, it would enable us to investigate further.

Re: Should an enclosing let keep the compiler from handling define-module?

2019-08-05 Thread Mark H Weaver
Hi Rob, Rob Browning writes: > This doesn't work with 2.2.4: > > (eval-when (expand load eval) > (let ((ignored #t)) > (define-module (bar) > #:use-module (has-foo)) > (format #t "foo: ~s\n" (foo > > producing: > > ERROR: In procedure %resolve-variable: > Unboun

Re: Should letrec via syntax work within eval-when (expand load eval)?

2019-08-05 Thread Mark H Weaver
Hi Rob, Rob Browning writes: > Rob Browning writes: > >> I narrowed down an issue I'd hit to this: >> >> ;; somefile.scm >> (define-syntax foo >> (syntax-rules () >> ((_ any ...) (letrec ((x y) (y 'foo)) x >> >> (eval-when (expand load eval) (foo 1)) > > Wait, maybe that's j