manpagez: man pages & more
info guile
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.10.9 Internal Macros

Scheme Procedure: make-syntax-transformer name type binding

Construct a syntax transformer object. This is part of Guile’s low-level support for syntax-case.

Scheme Procedure: macro? obj
C Function: scm_macro_p (obj)

Return #t if obj is a syntax transformer, or #f otherwise.

Note that it’s a bit difficult to actually get a macro as a first-class object; simply naming it (like case) will produce a syntax error. But it is possible to get these objects using module-ref:

(macro? (module-ref (current-module) 'case))
⇒ #t
Scheme Procedure: macro-type m
C Function: scm_macro_type (m)

Return the type that was given when m was constructed, via make-syntax-transformer.

Scheme Procedure: macro-name m
C Function: scm_macro_name (m)

Return the name of the macro m.

Scheme Procedure: macro-binding m
C Function: scm_macro_binding (m)

Return the binding of the macro m.

Scheme Procedure: macro-transformer m
C Function: scm_macro_transformer (m)

Return the transformer of the macro m. This will return a procedure, for which one may ask the docstring. That’s the whole reason this section is documented. Actually a part of the result of macro-binding.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on April 20, 2013 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.