From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Israelsson Tampe Newsgroups: gmane.lisp.guile.bugs Subject: bug#29520: Compilation error. Date: Fri, 1 Dec 2017 13:08:46 +0100 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a114acb740fdb15055f463b3b" X-Trace: blaine.gmane.org 1512150470 12962 195.159.176.226 (1 Dec 2017 17:47:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 1 Dec 2017 17:47:50 +0000 (UTC) To: 29520@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Fri Dec 01 18:47:42 2017 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eKpPY-0002py-1P for guile-bugs@m.gmane.org; Fri, 01 Dec 2017 18:47:40 +0100 Original-Received: from localhost ([::1]:59180 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKpPf-0003LE-A3 for guile-bugs@m.gmane.org; Fri, 01 Dec 2017 12:47:47 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKo2Y-0005sa-Kv for bug-guile@gnu.org; Fri, 01 Dec 2017 11:20:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eKo1t-0001wc-O5 for bug-guile@gnu.org; Fri, 01 Dec 2017 11:19:50 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59769) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eKo1n-0001tl-Mk for bug-guile@gnu.org; Fri, 01 Dec 2017 11:19:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eKo1m-0002Tj-CC for bug-guile@gnu.org; Fri, 01 Dec 2017 11:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Israelsson Tampe Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 01 Dec 2017 16:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 29520 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15121450829423 (code B ref -1); Fri, 01 Dec 2017 16:19:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Dec 2017 16:18:02 +0000 Original-Received: from localhost ([127.0.0.1]:40214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eKo0n-0002Rr-On for submit@debbugs.gnu.org; Fri, 01 Dec 2017 11:18:01 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:41680) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eKo0m-0002Rc-GR for submit@debbugs.gnu.org; Fri, 01 Dec 2017 11:18:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eKnyy-0007Qo-HW for submit@debbugs.gnu.org; Fri, 01 Dec 2017 11:17:53 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:45891) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eKnyy-0007QB-9T for submit@debbugs.gnu.org; Fri, 01 Dec 2017 11:16:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKnxt-0001CH-Kf for bug-guile@gnu.org; Fri, 01 Dec 2017 11:16:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eKnwE-00025d-55 for bug-guile@gnu.org; Fri, 01 Dec 2017 11:15:01 -0500 Original-Received: from mail-io0-x230.google.com ([2607:f8b0:4001:c06::230]:44671) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eKnwD-00022h-KN for bug-guile@gnu.org; Fri, 01 Dec 2017 11:13:17 -0500 Original-Received: by mail-io0-x230.google.com with SMTP id w127so11733292iow.11 for ; Fri, 01 Dec 2017 08:13:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=tde+6Rqxa5aquqh1zHuTgFXoYktKtjdcNoBToWWnFpU=; b=MavN+WkgWP0KxRL6+aUwO9r8/g37GRk7F2N7zdBLJE/p9vcGPhvGj7pGjZUKIHv/fk NnU4c6vStTWbbtsA4upFWFeLmhr9gcdIKhzicOv8LG1N/JGO6teI5Gs5WAdga2vFEwW/ 5hiotIprtlCQJkCVoLJFJw+Pnl1v8rRtCioISv7FLjz9Xxpb2+10zyrolfVkLmNlahHR I6IpmcMFE9F/qk/lfUSe/xIrYcYJ3uJcZ993vbS1pTsqWvwKn/BDqvpMkRZoTAkrZPkb uzHheEhBdCHfWTZpTnsJqm2SnU8qfy2wibtIgGCK2iF9lpAGu/ssWj0oOR8aR3s6ydNN DMgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=tde+6Rqxa5aquqh1zHuTgFXoYktKtjdcNoBToWWnFpU=; b=n/7zb+IPnHP4bxRLU/H9+uu8z/bKmREbvsnKG+f0NNACP+D4JZK55DFiFy6E96Dc+g vg6P7mff8bUM4X7oTLk4gk/RvIVONuHMIcLYHaaL5O83yJSs9vkzAqsuqY9VCvrnHXNa 8enE3uEzJP3XmG9AcCJhFvAer0tLeHl8Q9t1EY9gvPu0CrPKtjcpPSSXyhFlyBbEvg/C IddBbuHT9yXkrPRKk80B5i14zPUnel7j3/FzfZ7fLRJx93pHrqNnie79KR7xAPXXah2D 9UgruKLALLXYxsp2KnEjHgpe3rCU/t7rJTs6KbgoXpGOrNJJ4cGCnar3Yv9QcfxgQZNd oTFg== X-Gm-Message-State: AJaThX4zXkr/BQA8wufDEKlxZkPzgSSJNBzdu0Eq0tXAg5CqN5wfFy3/ 3ynfP3PZ+vbBqeaDiq6Qn2lKymeaRwTe2/GPRtmdaA== X-Google-Smtp-Source: AGs4zMapMZkzmdGhmCNdcUPeXkwzcNEGdOfyNoxMXWSuYvNcSfgAkzrk9v6ySDlyYecnKeUw4p/gPsyWic4Jx0m7Tg0= X-Received: by 10.107.182.7 with SMTP id g7mr11812674iof.39.1512130126796; Fri, 01 Dec 2017 04:08:46 -0800 (PST) Original-Received: by 10.107.139.134 with HTTP; Fri, 1 Dec 2017 04:08:46 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8920 Archived-At: --001a114acb740fdb15055f463b3b Content-Type: text/plain; charset="UTF-8" Consider the code at the end of this post. un-commenting f-scope reveals the compiler error: ;;; ERROR: unbound lexical # But without it the globalified versoin f-scope2 comiles just fine indicating an error in the compiler. Regards Stefan (define-syntax-rule ( (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))) ( (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) ( (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))) --001a114acb740fdb15055f463b3b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Consider the code at the end of this post. un-comment= ing 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 t= he compiler.

Regards
Stefan

=


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

<= div>=C2=A0 (lambda x (apply (g f x) x)))

(define (= h x2 n m)
=C2=A0 (lambda xx (apply (f-skip n m) x2)))
<= br>
(define (g f x3)
=C2=A0 (<p-lambda> (c)
=
=C2=A0 =C2=A0 (.. (c2) (f c))
=C2=A0 =C2=A0 (let ((n N) (m M= ))
=C2=A0 =C2=A0 =C2=A0 (.. ((h x3 n m) c2)))))

(define (f-scope2 f)
=C2=A0 (lambda x (apply (g f x) x)))=

--001a114acb740fdb15055f463b3b--