Re: New draft (#8) of and new "last call" for SRFI 189: Maybe and Either: optional container types
Wolfgang Corcoran-Mathe 11 Jul 2020 15:22 UTC
On 2020-07-10 16:39 +0200, Marc Nieper-Wißkirchen wrote:
> The following tests pass:
>
> [snip]
>
> (check (either= eqv? (with-exception-handler
> (lambda (x)
> (+ 1 x))
> (lambda ()
> (either-guard string? (+ 2 (raise-continuable 39)))))
> (right 42))
> => #t))
Thanks very much for the implementation and the tests.
This final test causes an "exception handler returned" error on Chibi
when either->exception / either-guard is implemented with guard. If
I'm reading R7 right, this is to be expected, as guard always invokes
raise if none of its clauses succeed. Thus, the continuation is lost.
I think John is right that we must use with-exception-handler.
--
Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz>
"Simplicity does not precede complexity, but follows it."
--Alan J. Perlis