From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Damien Mattei Newsgroups: gmane.lisp.guile.user Subject: syntax and undefined variable Date: Tue, 10 Sep 2024 15:09:39 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38781"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-user Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Tue Sep 10 15:10:31 2024 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1so0da-0009xm-Pj for guile-user@m.gmane-mx.org; Tue, 10 Sep 2024 15:10:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1so0dD-0004Y6-1e; Tue, 10 Sep 2024 09:10:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1so0d8-0004Fu-2s for guile-user@gnu.org; Tue, 10 Sep 2024 09:10:03 -0400 Original-Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1so0d4-0000Dl-N8 for guile-user@gnu.org; Tue, 10 Sep 2024 09:10:01 -0400 Original-Received: by mail-qk1-x72e.google.com with SMTP id af79cd13be357-7a9a3071c6bso281399185a.0 for ; Tue, 10 Sep 2024 06:09:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725973792; x=1726578592; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=ESbM8wWMDl15w8JjCaHs22dQTD0ttHi4bMp+EVgiP9s=; b=KFqCmpkKPr9ADX+QKFcRrh9Zl3uuOZV+qI75C/r/GGubQFFMeiKzvU0cGggm6UQRbk epVV58Wig2Swbf5KYx8IBIW+7v28+xrnGz0aCDTjwVJz+B+W3eblvmcl7EJyVyMkeULd ej6Z9kAZIq+BaZX6n5dB9CcdFlQ7lMcS9t9+RkPVXIZErtyNWZxsioU3hjrPIYMrQYs8 uBVznVqOpvw2RhJdLqeonPXBv02li9LJh7Kxmr136DcJvn2bFVXH+lEkfsX6Rfyv/YPS H4XqiEk8O2gCUB2z1ihC8DwtDmzSENb/763K2p/B1URsZFNN8nwgY3kf3AQ01RHGQ0vV tMzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725973792; x=1726578592; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ESbM8wWMDl15w8JjCaHs22dQTD0ttHi4bMp+EVgiP9s=; b=lFs+buXw/KP05GuD6itFm19VMoz1qv1SKoBS4LZDfFFlRxGCH9ZFUY4cyGWMiJOswZ LGBswLWX5x5tj3l8+I7oIB6j2E/qV3mm6AAd/d6rKrggs6DGd7Ib10GJri69sJ7o8Cs8 1aRKcsdLwosgBqq7JpdfrhLsgi58WOJ8F12SnyOO1W6iTxlz/1m3tLd+SjkPBrRdzdyX gqmYB+pSfDI0MTcrvuhAKiYR+BgPX+jvDMmM5Qkd1ZqR8ycqtGLjW1gZELcGKtDuVVyG Z9WOdvr72hUXZVysqPhikUuHUIaHwGXXQK/t7KXkz/MG5Yy1K0ZrqsCEaz3ipAVNdSS+ 3Dfg== X-Gm-Message-State: AOJu0YwgcTEhv3UBR3M59XfK3kcF9Ypm0q38pf04ZJp2OgRrsDYVSEGY W/FnlpOvy/G9WWqL/JhNzv23cV1N5631KAOIamqt9px9vNwMtCkUwwpDWZD+Isj1VcundBrV5bR j3iBUkK/MIWbmtgeIzrWMjYN8jL+Qi5Wk X-Google-Smtp-Source: AGHT+IEpoMeINXo052M5oF+Qn1EZQr6r+S+tVUyW0voLCGixJZckHsOjxf6TxRMLjy4zSZzSxx6cAIBwuR9p8SvqQqc= X-Received: by 2002:a05:620a:1a21:b0:7a9:bbcb:d39d with SMTP id af79cd13be357-7a9bbcbd98bmr804125685a.4.1725973791458; Tue, 10 Sep 2024 06:09:51 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::72e; envelope-from=damien.mattei@gmail.com; helo=mail-qk1-x72e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19796 Archived-At: hello, when i try to simplify my code that works it no more works, if change #'list by list it fails with this strange error: ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure variable-ref: Unbound variable: #> the code is: (define-syntax $bracket-apply$ (lambda (stx) (syntax-case stx () (($bracket-apply$ container arg-bracket ...) ; . args-brackets (with-syntax ((parsed-args ;;#`(list #,@(parse-square-brackets-arguments-lister-syntax #`(#,@#'args-brackets))))= ) (cons #'list ; list : cause ERROR in start-=CE=BB=CE=BF=CE=B3=CE=B9=CE= =BA=CE=B9-guile+.scm (logic-test) : ice-9/boot-9.scm:1685:16: In procedure raise-exception: ;; In procedure variable-ref: Unbound variable: #> (parse-square-brackets-arguments-lister-syntax #'(arg-bracket ...))))) (display "$bracket-apply$ : #'parsed-args=3D") (display #'parsed-args) (newline) #'($bracket-apply$next4list-args container parsed-args)))))) the strange things is that it can ran on complex code that use this library (bracket-apply) but fail with others one. It is not important as i have a good working version but if someone have an idea? the problem is that i have no idea for debug of which value is undefined as the back trace just output this: scheme@(guile-user)> (logic-test) test 1 (or (and (not a) (not b) (not c) (not d)) (and (not a) (not b) (not c) d) (and (not a) (not b) c (not d)) (and (not a) b (not c) d) (and (not a) b c (not d)) (and (not a) b c d) (and a (not b) (not c) (not d)) (and a (not b) (not c) d) (and a (not b) c (not d)) (and c (not d))) =3D ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure variable-ref: Unbound variable: #> Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guile-user) [1]> ,bt In ice-9/eval.scm: 619:8 14 (_ #(#(#(#) #) # =E2=80=A6)) 626:19 13 (_ #(#(#(#) #) # =E2=80=A6)) 155:9 12 (_ #(#(#) (or (and (not a) (not b) (not c) (not d)) (=E2=80=A6) =E2=80=A6))) 619:8 11 (_ #(#(#(#) (or (and (not a) (not b) (not c) (# =E2=80=A6)) =E2=80=A6)) # =E2=80=A6)) 626:19 10 (_ #(#(#(#) (or (and (not a) (not b) (not c) (# =E2=80=A6)) =E2=80=A6)) # =E2=80=A6)) 619:8 9 (_ #(#(#(# (a b c d) (or (and c (not d)) (and =E2=80=A6) =E2=80=A6)) #) # =E2=80=A6)) 626:19 8 (_ #(#(#(# (a b c d) (or (and c (not d)) (and =E2=80=A6) =E2=80=A6)) #) # =E2=80=A6)) In unknown file: 7 (sort ((1 1 1 0) (1 0 1 0) (1 0 0 1) (1 0 0 0) (0 1 1 1) (0 1 1 0) (0 1 0 1) (0 0 1 0) (0 =E2=80=A6) #) #) In ice-9/eval.scm: 619:8 6 (_ #(#(#(#) (1 0 0 1) (1 0 1 0)) #)) 626:19 5 (_ #(#(#(#) (1 0 0 1) (1 0 1 0)) #)) 619:8 4 (_ #(#(#(#) (1 0 0 1)) # =E2=80=A6)) 304:50 3 (_ #(#(#(#) (1 0 0 1)) # =E2=80=A6)) 196:27 2 (_ #(#(#(#) (1 0 0 1)) # =E2=80=A6)) 227:9 1 (_ _) In ice-9/boot-9.scm: 1685:16 0 (raise-exception _ #:continuable? _) damien