[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 03/03: peval: Indenting. NFC.
From: |
Andy Wingo |
Subject: |
[Guile-commits] 03/03: peval: Indenting. NFC. |
Date: |
Wed, 13 Mar 2024 15:29:13 -0400 (EDT) |
wingo pushed a commit to branch main
in repository guile.
commit 17e8d7530fb086a3481c23047fcacdeebec0d2a7
Author: Andy Wingo <wingo@pobox.com>
AuthorDate: Wed Mar 13 20:28:43 2024 +0100
peval: Indenting. NFC.
* module/language/tree-il/peval.scm (peval): Reindent.
---
module/language/tree-il/peval.scm | 50 +++++++++++++++++++--------------------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/module/language/tree-il/peval.scm
b/module/language/tree-il/peval.scm
index dd777d863..f6dc9a38d 100644
--- a/module/language/tree-il/peval.scm
+++ b/module/language/tree-il/peval.scm
@@ -580,15 +580,15 @@ top-level bindings from ENV and return the resulting
expression."
(define (apply-primitive name args)
;; todo: further optimize commutative primitives
(catch #t
- (lambda ()
- (define mod (resolve-interface (primitive-module name)))
- (call-with-values
- (lambda ()
- (apply (module-ref mod name) args))
- (lambda results
- (values #t results))))
- (lambda _
- (values #f '()))))
+ (lambda ()
+ (define mod (resolve-interface (primitive-module name)))
+ (call-with-values
+ (lambda ()
+ (apply (module-ref mod name) args))
+ (lambda results
+ (values #t results))))
+ (lambda _
+ (values #f '()))))
(define (make-values src values)
(match values
((single) single) ; 1 value
@@ -1307,22 +1307,22 @@ top-level bindings from ENV and return the resulting
expression."
(($ <primcall> src 'values exps)
(match exps
- (()
- (case ctx
- ((effect) (make-void #f))
- ((values) exp)
- ;; Zero values returned to continuation expecting a value:
- ;; ensure that we raise an error.
- (else (make-primcall src 'values (list exp)))))
- ((($ <primcall> _ 'values ())) exp)
- (_
- (let ((vals (map for-value exps)))
- (if (and (case ctx
- ((value test effect) #t)
- (else (null? (cdr vals))))
- (every singly-valued-expression? vals))
- (for-tail (list->seq src (append (cdr vals) (list (car vals)))))
- (make-primcall src 'values vals))))))
+ (()
+ (case ctx
+ ((effect) (make-void #f))
+ ((values) exp)
+ ;; Zero values returned to continuation expecting a value:
+ ;; ensure that we raise an error.
+ (else (make-primcall src 'values (list exp)))))
+ ((($ <primcall> _ 'values ())) exp)
+ (_
+ (let ((vals (map for-value exps)))
+ (if (and (case ctx
+ ((value test effect) #t)
+ (else (null? (cdr vals))))
+ (every singly-valued-expression? vals))
+ (for-tail (list->seq src (append (cdr vals) (list (car
vals)))))
+ (make-primcall src 'values vals))))))
(($ <primcall> src 'apply (proc args ... tail))
(let lp ((tail* (find-definition tail 1)) (speculative? #t))