This library is a compatibility layer. It helps to provide hints to the Lisp compiler. Hints allow the compiler to show more precise error messages when error happens during the macro-expansion.
Here is an example I’ve stolen from the library’s documentation. To show you how this works in dynamic, I’ve recorded a GIF image.
Pay attention, without the hint compiler highlights “even-number-case” top-level form:
That is it. You just wrap some part of the macro-processing code with
with-current-source-form
and say: “Hey, compiler! Here is the s-expr I’m
currently processing. If some shit will happen, let the user know.”
As I said before, this library is a compatibility layer. Only SBCL and Clasp are supported for now. On other implementations, the macro will do nothing.