Common Lisp compiler macro utilities
Common Lisp
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
compiler-macro-utils.asd
compiler-macro-utils.lisp

README.md

compiler-macro-utils

Here I intend to collect tools and utilities for writing and working with Common Lisp compiler macros.

This is what the Hyperspec has to say of the purpose of compiler macros:

The purpose of the compiler macro facility is to permit selective source code transformations as optimization advice to the compiler.

The compiler-macro-utils package contains the following symbols:

[Function]
compiler-macro-expand form &optional env => expansion, expanded-p

If a compiler macro is defined for form, it is expanded repeatedly in the lexical environment env until expansion is declined. The resulting expansion is returned and true is returned as a second value.

If there is no compiler macro defined, form is simply returned unchanged and false is returned as a second value.

[Function]
compiler-macro-expand-1 form &optional env => expansion, expanded-p

If a compiler macro is defined for form, it is expanded once in the lexical environment env and the resulting expansion is returned and true is returned as a second value.

If there is no compiler macro defined, form is simply returned unchanged and false is returned as a second value.

[Function]
compiler-macro-p name => boolean

Returns true if a compiler macro is defined for name, otherwise false.

[Function]
literal-p object => boolean

Returns true if object is either an atom or a list where the first element is the symbol quote, otherwise false.