unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#29520: Compilation error.
@ 2017-12-01 12:08 Stefan Israelsson Tampe
  2017-12-03 22:05 ` bug#29520: peval leaves behind dangling lexical reference Mark H Weaver
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Israelsson Tampe @ 2017-12-01 12:08 UTC (permalink / raw)
  To: 29520

[-- Attachment #1: Type: text/plain, Size: 943 bytes --]

Consider the code at the end of this post. un-commenting f-scope reveals
the compiler error:

;;; ERROR: unbound lexical #<tree-il (lexical x #{x 190}#)>

But without it the globalified versoin f-scope2 comiles just fine
indicating an error in the compiler.

Regards
Stefan



(define-syntax-rule (<p-lambda> (c) code ...) (lambda (a b cc d c) code
...))
(define-syntax ..
  (syntax-rules ()
    ((.. (f a ...)) (f x y z a ...))
    ((.. (s ...) (f a ...))
     (f x y z a ...))))
#;
(define (f-scope f)
  (define (g f x3)
    (define (h x2 n m)
      (lambda xx (apply (f-skip n m) x2)))
    (<p-lambda> (c)
      (.. (c2) (f c))
      (let ((n N) (m M))
        (.. ((h x3 n m) c2)))))

  (lambda x (apply (g f x) x)))

(define (h x2 n m)
  (lambda xx (apply (f-skip n m) x2)))

(define (g f x3)
  (<p-lambda> (c)
    (.. (c2) (f c))
    (let ((n N) (m M))
      (.. ((h x3 n m) c2)))))

(define (f-scope2 f)
  (lambda x (apply (g f x) x)))

[-- Attachment #2: Type: text/html, Size: 1811 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-03-16  3:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-01 12:08 bug#29520: Compilation error Stefan Israelsson Tampe
2017-12-03 22:05 ` bug#29520: peval leaves behind dangling lexical reference Mark H Weaver
2017-12-04  0:43   ` Mark H Weaver
2017-12-04  5:41     ` Mark H Weaver
2017-12-04 21:10       ` Mark H Weaver
2017-12-05  2:55         ` Mark H Weaver
2018-03-16  3:41           ` Mark H Weaver

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).