Peter Bex scripsit:

> Is that the only use case? In that case I'd just put something like the
> following at toplevel:
> 
> (cond-expand (not %bignums)
>   (error "Sorry, but this package requires bignum support"))

Yes, that works at top level, but not within a module, which is why
I provided special syntax for modules.

> This should also throw an error at import time.  If you wish
> "compile-time" errors, the same effect could be achieved by calling
> a macro (maybe "error*"?) that throws an error at compile-time.

JRM's Primer defines it thus:

 (define-syntax syntax-error
   (syntax-rules ()
     ((syntax-error) (syntax-error "Bad use of syntax-error!"))))

Saying (syntax-error "Missing fzatt") will cause the syntax expander to
complain of invalid syntax, hopefully displaying "Missing fzatt" at the
same time.  This should really be standardized for consistency's sake.

-- 
All Gaul is divided into three parts: the part          John Cowan
that cooks with lard and goose fat, the part            http://ccil.org/~cowan
that cooks with olive oil, and the part that            [email protected]
cooks with butter. --David Chessler

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to