1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-14 15:40:19 +02:00

Several fixes to R6RS libraries

* module/rnrs/arithmetic/fixnums.scm (fixnum-width): Make this return an
  an exact integer instead of an inexact number.

* module/rnrs/base.scm (assertion-violation): Implement.

* module/rnrs/conditions.scm (simple-conditions): Allow also simple
  conditions as argument.

* module/rnrs/enums.scm (define-enumeration): Properly construct empty
  enumeration sets.

* module/rnrs/exceptions.scm (guard): Don't restrict the body to a
  single expression.

* module/rnrs/records/syntactic.scm (define-record-type0): Expand into a
  series of definitions only.
This commit is contained in:
Andreas Rottmann 2010-08-28 10:16:30 -07:00 committed by Andy Wingo
parent 7d0e17389c
commit 23988e8c50
6 changed files with 45 additions and 13 deletions

View file

@ -51,17 +51,17 @@
(define-syntax guard0
(syntax-rules ()
((_ (variable cond-clause ...) body)
((_ (variable cond-clause ...) . body)
(call/cc (lambda (continuation)
(with-exception-handler
(lambda (variable)
(continuation (cond cond-clause ...)))
(lambda () body)))))))
(lambda () . body)))))))
(define-syntax guard
(syntax-rules (else)
((_ (variable cond-clause ... . ((else else-clause ...))) body)
(guard0 (variable cond-clause ... (else else-clause ...)) body))
((_ (variable cond-clause ...) body)
(guard0 (variable cond-clause ... (else (raise variable))) body))))
((_ (variable cond-clause ... . ((else else-clause ...))) . body)
(guard0 (variable cond-clause ... (else else-clause ...)) . body))
((_ (variable cond-clause ...) . body)
(guard0 (variable cond-clause ... (else (raise variable))) . body))))
)