(index ("er-macros" 0) ("er-macro-rules" 323) ("er-macro-define" 1315) ("er-macro-let" 1702) ("er-macro-letrec" 2034))
(def (sig (procedure "(er-macros sym)" (id er-macros))) (p "where sym is optional.") (p "This is the documentation dispatcher provided for all modules written in the Design-by-Contract style. Without a symbol, it lists all exported symbols of the module, with one of these symbols it prints the contract of that symbol."))
(def (sig (syntax "(er-macro-rules (%sym ...) (code0 xpr0) (code1 xpr1) ...)" (id er-macro-rules))) (p "references a renamed version of sym ... under the name %sym ... and pairs the differnt macro-codes code0 code1 ... with expressions xpr0 xpr1 ..., which usually evalute to backquoted templates.") (p "This macro is unhygienic by design, it introduces the symbol compare?  into its scope. The macro is implemented in contracts and only passed through.") (p "Unhygienic macros can not be implemented with syntax-rules, so we must use er-macro-transformer or er-macro-rules.") (p "Based on er-macro-rules, it's easy to implement three macros, er-macro-define, er-macro-let and er-macro-letrec, which facilitate the implementation of low-level macros even more: We simply match one pattern, the macro code, against a list of the form") (pre " (with-renamed (%sym ...) body . body...)") (p "where %sym ... are aliases of sym ... and the sequence body . body... produces the macro-expansion."))
(def (sig (syntax "(er-macro-define code (with-renamed (%sym ...) body . body...))" (id er-macro-define))) (p "where code is the complete macro-code (name . args), i.e. the pattern of a macro call, and (with-renamed ...) is explained above.") (p "er-macro-let and er-macro-letrec are local versions of er-macro-define, where the local macros are evaluated in parallel or recursively."))
(def (sig (syntax "(er-macro-let ((code0 (with-renamed (%sym0 ...) body0 .  body0...)) ...) body . body...)" (id er-macro-let))) (p "where code0, %sym0 and body0, body0... are as in macro-define. This is a local version of er-macro-define, allowing a list of (code with-xpr) lists to be processed in body . body ... in parallel."))
(def (sig (syntax "(er-macro-letrec ((code0 (with-renamed (%sym0 ...) body0 .  body0...)) ...) body . body...)" (id er-macro-letrec))) (p "where code0, %sym0 and body0, body0... are as in macro-define. This is a local version of er-macro-define, allowing a list of (code with-xpr) lists to be processed recursively."))
