| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Signal an error. They are same as
error and errorf (See section Signalling exceptions),
except that the error is signalled at macro-expansion time
(i.e. compile time) rather than run time.
They are useful to tell the user the wrong usage of macro in
the comprehensive way, instead of the cryptic error from the macro
expander. Because of the purpose, arg … are first
passed to unwrap-syntax described below, to strip off
the internal syntactic binding informations.
(define-syntax my-macro
(syntax-rules ()
((_ a b) (foo2 a b))
((_ a b c) (foo3 a b c))
((_ . ?)
(syntax-error "malformed my-macro" (my-macro . ?)))))
(my-macro 1 2 3 4)
⇒ error: "malformed my-macro: (mymacro 1 2 3 4)"
|
Removes internal syntactic information from form. In order to implement a hygienic macro, macro expander replaces symbols in the macro form for identifiers, which captures the syntactic environment where they are defined. Although it is necessary information for the compiler, it is rather confusing for users if it appears in the messages. This function replaces occurrences of identifiers in form to the original symbols.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated by Shiro Kawai on October, 7 2008 using texi2html 1.78.