fare-quasiquote is a portable quasiquote implementation that plays well with pattern-matching

You probably want to :depend-on (:fare-quasiquote-extras), which enables the named-readtable :fare-quasiquote and hooks for pattern-matching with optima.

Then in your file, you would

(defpackage ... (:use :optima) ...)

(in-package ...)

(in-readtable :fare-quasiquote)

... (match (`(foo ,@bar) ...) ...)

(in-readtable :standard)

Note that ,@ probably only works well with pattern-matching when in final position, and that the pedantically correct syntax is `(foo . ,bar) whereas the former in a strict reading of the standard is required to (append ... nil) which optima won't recognize.

fare-quasiquote has a test suite with a lot of test cases that you can easily adapt and reuse to test your own implementation of quasiquote (useful for CL vendors, if they dare).

fare-quasiquote is written by Fare Rideau.

git clone https://gitlab.common-lisp.net/frideau/fare-quasiquote.git

Browse it at https://gitlab.common-lisp.net/frideau/fare-quasiquote