1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 03:30:27 +02:00

Changes from arch/CVS synchronization

This commit is contained in:
Ludovic Courtès 2007-09-10 18:28:15 +00:00
parent 454866e052
commit bc4ee34e1d
2 changed files with 23 additions and 10 deletions

View file

@ -1,3 +1,10 @@
2007-09-10 Ludovic Courtès <ludo@gnu.org>
* srfi-35.scm (make-compound-condition-type): When PARENTS
contains only one element, return its car. This improves the
output of `print-condition' for non-compound conditions returned
by `make-compound-condition'.
2007-08-11 Ludovic Courtès <ludo@gnu.org>
* srfi-35.scm: New file.

View file

@ -115,16 +115,22 @@ supertypes."
;; Return a compound condition type made of the types listed in PARENTS.
;; All fields from PARENTS are kept, even same-named ones, since they are
;; needed by `extract-condition'.
(let* ((all-fields (append-map condition-type-all-fields
parents))
(layout (struct-layout-for-condition all-fields)))
(make-struct %condition-type-vtable 0
(make-struct-layout layout) ;; layout
print-condition ;; printer
id
parents ;; list of parents!
all-fields
all-fields)))
(cond ((null? parents)
(error "`make-compound-condition-type' passed empty parent list"
id))
((null? (cdr parents))
(car parents))
(else
(let* ((all-fields (append-map condition-type-all-fields
parents))
(layout (struct-layout-for-condition all-fields)))
(make-struct %condition-type-vtable 0
(make-struct-layout layout) ;; layout
print-condition ;; printer
id
parents ;; list of parents!
all-fields
all-fields)))))
;;;