mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Added with-handler from Bigloo
This commit is contained in:
parent
18b4292e4f
commit
4420fc3c6c
3 changed files with 7 additions and 2 deletions
|
@ -36,6 +36,7 @@ Features
|
|||
- Updated the garbage collector to enhance performance for programs with a high allocation rate, and to scale better to multiple concurrent threads.
|
||||
- Improved error handling by `display` and `write`.
|
||||
- Removed the `make_int` C macro which was deprecated and could cause problems when used in FFI functions.
|
||||
- Added a `with-handler` exception handler form based on the syntax from Bigloo.
|
||||
|
||||
Bug Fixes
|
||||
|
||||
|
|
|
@ -152,6 +152,7 @@ For more information see the [R<sup>7</sup>RS Scheme Specification](../../r7rs.p
|
|||
- [`vector-map`](#vector-map)
|
||||
- [`when`](#when)
|
||||
- [`with-exception-handler`](#with-exception-handler)
|
||||
- [`with-handler`](#with-handler)
|
||||
- [`write-char`](#write-char)
|
||||
- [`write-string`](#write-string)
|
||||
- [`zero?`](#zero)
|
||||
|
@ -1107,6 +1108,10 @@ Semantics: The `test` is evaluated, and if it evaluates to a true value, the exp
|
|||
|
||||
(with-exception-handler handler thunk)
|
||||
|
||||
# with-handler
|
||||
|
||||
(with-handler handler body)
|
||||
|
||||
# write-char
|
||||
|
||||
(write-char char)
|
||||
|
|
|
@ -987,8 +987,7 @@
|
|||
(lambda (k)
|
||||
(with-exception-handler
|
||||
(lambda (obj)
|
||||
(,(cadr exp) obj)
|
||||
(k #t))
|
||||
(k (,(cadr exp) obj)))
|
||||
(lambda ()
|
||||
,@(cddr exp))))))))
|
||||
(define (with-exception-handler handler thunk)
|
||||
|
|
Loading…
Add table
Reference in a new issue