[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compatibility with other SRFIs



Although I wouldn't like to see a dependency on other SRFIs, I think a section treating compatibility with them would be useful. Perhaps something like the following after the "Standard Conditions" section?

--begin suggested section----------
Compatibility with other SRFIs:
------------------------------
SRFI-18, SRFI-21 and SRFI-23 define some standard conditions. If a Scheme implementation provides these SRFIs, it should use the following definitions:

For SRFI-18 and SRFI-21:
  (define-condition-type &join-timeout &condition
    join-timeout-exception?)
  (define-condition-type &abandoned-mutex &serious
    abandoned-mutex-exception?)
  (define-condition-type &terminated-thread &condition
    terminated-thread-exception?)
  (define-condition-type &uncaught &serious
    uncaught-exception?
    (reason uncaught-exception-reason))

For SRFI-23:
  (define-condition-type &srfi-23-error &error
    srfi-23-error?
    (reason srfi-23-error-reason)
    (args srfi-23-error-args))
  (define (make-error-exception r a)
    (make-condition &srfi-23-error reason r args a))
  (define (error reason . args)
    (raise (make-error-exception reason args))
--end suggested section----------
--
Darren Bane
PGP key available from keyservers or my .plan
Key ID: 2DA0C6EF.  Call me for the fingerprint.