[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] branch main updated: Fix no-clause case-lambda in peval
From: |
Daniel Llorens |
Subject: |
[Guile-commits] branch main updated: Fix no-clause case-lambda in peval |
Date: |
Fri, 17 Mar 2023 16:18:26 -0400 |
This is an automated email from the git hooks/post-receive script.
lloda pushed a commit to branch main
in repository guile.
The following commit(s) were added to refs/heads/main by this push:
new f0df1ed0f Fix no-clause case-lambda in peval
f0df1ed0f is described below
commit f0df1ed0fdca7a63cffda5e53c968e814b7b06ec
Author: Daniel Llorens <lloda@sarc.name>
AuthorDate: Fri Mar 17 21:03:33 2023 +0100
Fix no-clause case-lambda in peval
This is checked by optargs.test, which
3b47f87618047ebb8812788c64a44877a4f2e0dd
broke.
* module/language/tree-il/peval.scm (peval): Account for no clause (= no
body)
case-lambda.
---
doc/ref/api-control.texi | 2 +-
module/language/tree-il/peval.scm | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/doc/ref/api-control.texi b/doc/ref/api-control.texi
index 158ed8ad8..d024e14a5 100644
--- a/doc/ref/api-control.texi
+++ b/doc/ref/api-control.texi
@@ -1323,7 +1323,7 @@ exception handlers are invoked within the continuation of
the error,
without unwinding the stack. The dynamic environment of the handler
call will be that of the @code{raise-exception} call, with the
difference that the current exception handler will be ``unwound'' to the
-\"outer\" handler (the one that was in place when the corresponding
+``outer'' handler (the one that was in place when the corresponding
@code{with-exception-handler} was called).
However, it's often the case that one would like to handle an exception
diff --git a/module/language/tree-il/peval.scm
b/module/language/tree-il/peval.scm
index 7c05e9a2e..36a3033b0 100644
--- a/module/language/tree-il/peval.scm
+++ b/module/language/tree-il/peval.scm
@@ -1671,6 +1671,7 @@ top-level bindings from ENV and return the resulting
expression."
(($ <lambda> src-proc meta orig-body)
;; If there are multiple cases and one matches nargs, omit all the
others.
(or (and
+ orig-body
(lambda-case-alternate orig-body)
(let ((nargs (length orig-args)))
(let loop ((body orig-body))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] branch main updated: Fix no-clause case-lambda in peval,
Daniel Llorens <=