j14i/cl-macros huggingface dataset:
Create a Common Lisp macro for the following transformation. Before code:
(define-cruft %clear-readtable (readtable) "Make all macro characters in READTABLE be constituents." #+ :sbcl (prog1 readtable (do-readtable (char readtable) (set-syntax-from-char char #\A readtable)) (setf (sb-impl::dispatch-tables readtable) nil)) #+ :allegro (prog1 readtable (do-readtable (char readtable) (set-syntax-from-char char #\A readtable)) (let ((dispatch-tables (excl::readtable-dispatch-tables readtable))) (setf (cdr dispatch-tables) nil) (setf (caar dispatch-tables) #\Backspace) (setf (cadar dispatch-tables) (fill (cadar dispatch-tables) nil)))) #+ :cmucl (prog1 readtable (do-readtable (char readtable) (set-syntax-from-char char #\A readtable)) (setf (lisp::dispatch-tables readtable) nil)) #+ :common-lisp (do-readtable (char readtable readtable) (set-syntax-from-char char #\A readtable)))

What needs to change: Macro call that should be transformed by define-cruft

Macro definition:
(defmacro define-cruft (name lambda-list &body (docstring . alternatives))
  (assert (typep docstring 'string) (docstring) "Docstring missing!")
  (assert (not (null alternatives)))
  `(progn
     (declaim (inline ,name))
     (defun ,name ,lambda-list ,docstring ,(first alternatives))))

Macroexpansion:
(progn (declaim (inline %clear-readtable)) (defun %clear-readtable (readtable) "Make all macro characters in READTABLE be constituents." (prog1 readtable (do-readtable (char readtable) (set-syntax-from-char char #\LATIN_CAPITAL_LETTER_A readtable)) (setf (sb-impl:dispatch-tables readtable) nil))))
Define a macro that eliminates this repetitive pattern:
(with-package (package) (loop for (type . args) in options do (expand-option type package args)))

Issue: Macro call that should be transformed by with-package

Macro definition:
(defmacro with-package ((var &optional (package var)) &body body)
  `(let ((,var (ensure-package ,package)))
     ,@body))

Macroexpansion:
(let ((package (ensure-package package))) (loop for (type . args) in options do (expand-option type package args)))
You are a Common Lisp macro expert. Given this code pattern:
(defsynonym count :count)

Write a macro that addresses: Macro call that should be transformed by defsynonym

Macro definition:
(defmacro defsynonym (symbol synonym)
  "Set SYNONYM for a SYMBOL. "
  `(eval-always
     (setf (get ',symbol 'synonym) ',synonym)))

Macroexpansion:
(eval-always (setf (get (quote count) (quote synonym)) (quote :count)))
Define a macro that eliminates this repetitive pattern:
(with-yield-binds (format nil "DROP~:[~; IF EXISTS~] VIEW ~A" (drop-view-statement-if-exists statement) (yield (drop-view-statement-view-name statement))))

Issue: Macro call that should be transformed by with-yield-binds

Macro definition:
(defmacro with-yield-binds (&body body)
  `(let ((*bind-values* nil)
         (*use-global-bind-values* t))
     (values
      (progn ,@body)
      (loop for bind in (reverse *bind-values*)
            append bind))))

Macroexpansion:
(let ((*bind-values* nil) (*use-global-bind-values* t)) (values (progn (format nil "DROP~:[~; IF EXISTS~] VIEW ~A" (drop-view-statement-if-exists statement) (yield (drop-view-statement-view-name statement)))) (loop for bind in (reverse *bind-values*) append bind)))
Write a Common Lisp macro to handle this code pattern:
(*> +opt-fws+ #'comment)

Problem: Macro call that should be transformed by *>

Macro definition:
(defmacro *> (parser &rest parsers)
  "Combination of parsers yielding the result of the rightmost one."
  (let ((offset (gensym "*>-OFFSET")))
    `(lambda (,offset)
       ,(reduce (lambda (i p)
                  (let ((res  (gensym "*>-RES"))
                        (next (gensym "*>-NEXT")))
                    `(multiple-value-bind (,res ,next) ,i
                       (if (ok? ,res)
                           (funcall ,p ,next)
                           (fail ,next)))))
                parsers
                :initial-value `(funcall ,parser ,offset)))))

Macroexpansion:
(lambda (#:*>-offset137) (multiple-value-bind (#:*>-res138 #:*>-next139) (funcall +opt-fws+ #:*>-offset137) (if (ok? #:*>-res138) (funcall (function comment) #:*>-next139) (fail #:*>-next139))))
Generate a defmacro form that transforms code like this:
(compiler-macro-lambda (int) `(format t "~&Compile time: ~A -> ~A.~%" ',int ,int))

Pattern to recognize: Macro call that should be transformed by compiler-macro-lambda

Macro definition:
(defmacro compiler-macro-lambda (lambda-list &body body)
  (introspect-environment:parse-compiler-macro (gensym "COMPILER-MACRO-LAMBDA")
                                               lambda-list
                                               body))

Macroexpansion:
(sb-int:named-lambda (compiler-macro #:compiler-macro-lambda145) (#:expr #:env) (declare (sb-c::lambda-list (int))) (declare (ignore #:env)) (sb-int:named-ds-bind (:macro #:compiler-macro-lambda145 . define-compiler-macro) (int) (sb-c::compiler-macro-args #:expr) (declare (sb-c::constant-value int) (sb-c::no-compiler-macro #:compiler-macro-lambda145)) (block #:compiler-macro-lambda145 (sb-int:quasiquote (format t "~&Compile time: ~A -> ~A.~%" (quote #S(sb-impl::comma :expr int :kind 0)) #S(sb-impl::comma :expr int :kind 0))))))
Generate a defmacro form that transforms code like this:
(in-compile-time nil
  :key
  nil)

Pattern to recognize: Macro call that should be transformed by IN-COMPILE-TIME

Macro definition:
(defmacro IN-COMPILE-TIME ...)

Macroexpansion:
(macrolet ((#:macro144 (&environment ())
             :key
             nil))
  (#:macro144))
Create a Common Lisp macro for the following transformation. Before code:
(with-yield-binds (format nil "~A AS ~A" (if (sql-statement-p (as-op-left op)) (yield (make-sql-list (as-op-left op))) (yield (as-op-left op))) (with-table-name nil (yield (as-op-right op)))))

What needs to change: Macro call that should be transformed by with-yield-binds

Macro definition:
(defmacro with-yield-binds (&body body)
  `(let ((*bind-values* nil)
         (*use-global-bind-values* t))
     (values
      (progn ,@body)
      (loop for bind in (reverse *bind-values*)
            append bind))))

Macroexpansion:
(let ((*bind-values* nil) (*use-global-bind-values* t)) (values (progn (format nil "~A AS ~A" (if (sql-statement-p (as-op-left op)) (yield (make-sql-list (as-op-left op))) (yield (as-op-left op))) (with-table-name nil (yield (as-op-right op))))) (loop for bind in (reverse *bind-values*) append bind)))
Define a macro that eliminates this repetitive pattern:
(vect-of nil nil)

Issue: Macro call that should be transformed by VECT-OF

Macro definition:
(defmacro VECT-OF ...)

Macroexpansion:
(let ((#:vect138 (make-array 10 :adjustable t :fill-pointer 0)))
  (do-for (nil)
    (vector-push-extend nil #:vect138))
  #:vect138)
You are a Common Lisp macro expert. Given this code pattern:
(setf nil (progn))

Write a macro that addresses: Macro call that should be transformed by SETF

Macro definition:
(defmacro SETF ...)

Macroexpansion:
(setq nil (progn))
Generate a defmacro form that transforms code like this:
(define-global-parameter nil (progn))

Pattern to recognize: Macro call that should be transformed by DEFINE-GLOBAL-PARAMETER

Macro definition:
(defmacro DEFINE-GLOBAL-PARAMETER ...)

Macroexpansion:
(progn
 (store-in-symbol-plist nil (progn) .value-key.)
 (sb-ext:defglobal nil (get 'nil +value-key+))
 (eval-when (:compile-toplevel :load-toplevel :execute)
   (setf nil (get 'nil +value-key+)))
 (remprop 'nil +value-key+)
 'nil)
Create a Common Lisp macro for the following transformation. Before code:
(define-definition-resolver optimizer (designator package) (let ((fun-info (when (symbolp designator) (sb-int:info :function :info designator)))) (when fun-info (let ((otypes '(sb-c:fun-info-derive-type sb-c:fun-info-ltn-annotate sb-c:fun-info-optimizer sb-c:fun-info-ir2-convert sb-c::fun-info-stack-allocate-result sb-c::fun-info-constraint-propagate sb-c::fun-info-constraint-propagate-if sb-c::fun-info-call-type-deriver))) (loop for reader in otypes for fn = (funcall reader fun-info) when fn collect (make-instance 'optimizer :designator designator :package package :optimizer fn))))))

What needs to change: Macro call that should be transformed by define-definition-resolver

Macro definition:
(defmacro define-definition-resolver (name args &body body)
  `(progn (setf (definition-resolver ',name)
                (lambda ,args ,@body))
          ',name))

Macroexpansion:
(progn (setf (definition-resolver (quote optimizer)) (lambda (designator package) (let ((fun-info (when (symbolp designator) (sb-int:info :function :info designator)))) (when fun-info (let ((otypes (quote (sb-c:fun-info-derive-type sb-c:fun-info-ltn-annotate sb-c:fun-info-optimizer sb-c:fun-info-ir2-convert sb-c::fun-info-stack-allocate-result sb-c::fun-info-constraint-propagate sb-c::fun-info-constraint-propagate-if sb-c::fun-info-call-type-deriver)))) (loop for reader in otypes for fn = (funcall reader fun-info) when fn collect (make-instance (quote optimizer) :designator designator :package package :optimizer fn))))))) (quote optimizer))
Create a Common Lisp macro for the following transformation. Before code:
(->
  nil
  :key
  nil)

What needs to change: Macro call that should be transformed by ->

Macro definition:
(defmacro -> ...)

Macroexpansion:
(let* ((#:var152 nil) (#:var153 (:key #:var152)) (#:var154 (nil #:var153)))
  #:var154)
You are a Common Lisp macro expert. Given this code pattern:
(with-mocks () (register-mock 'foo) (dotimes (i 3) (foo)) (is (eql 3 (length (invocations)))))

Write a macro that addresses: Macro call that should be transformed by with-mocks

Macro definition:
(defmacro with-mocks ((&key (recordp T)) &body body)
  "Execute BODY in a new mocking context.  Invocations will be recorded
if RECORDP is set (default true)."
  `(call-with-mocks
    (lambda () ,@body)
    :recordp ,recordp))

Macroexpansion:
(call-with-mocks (lambda nil (register-mock (quote foo)) (dotimes (i 3) (foo)) (is (eql 3 (length (invocations))))) :recordp t)
Write a Common Lisp macro to handle this code pattern:
(with-env (setp 7 [struct 'a]))

Problem: Macro call that should be transformed by with-env

Macro definition:
(defmacro with-env (&body body)
  (let ((body-value (gensym)))
    `(let (,body-value)
       (defclass foo () ((a :initform 3)))
       (defmethod get-val ((object foo) &rest slot/s) (slot-value object (car slot/s)))
       (defmethod (setf get-val) (new-value (object foo) &rest slot/s)
         (setf (slot-value object (car slot/s)) new-value))
       (defstruct bar a)
       (setq ,body-value
             (let ((str (alexandria:copy-array "abcde"))
                   (vec (alexandria:copy-array #(a b c d e)))
                   (arr (alexandria:copy-array #2A((1 2 3)
                                                   (4 5 6))))
                   (list      (copy-list '(a b c d e)))
                   (ht        (eval (read-from-string "{'a 'b 'c 'd}")))
                   (ht-eq     (eval (read-from-string "{eq \"a\" 1
                                                    \"b\" 2}")))
                   (ht-equalp (eval (read-from-string "{equalp '(1 2 3) \"a\"
                                                               '(4 5 6) \"b\"}")))
                   (assoc-list (copy-tree '((a . 1) (b . 2))))
                   (plist      (copy-list '(:a 4 :c 5)))
                   (clos-object (make-instance 'foo))
                   (struct      (make-bar :a 3)))
               (declare (ignorable str vec arr list ht ht-eq ht-equalp
                                   assoc-list plist clos-object struct))
               ,@body))
       (setf (find-class 'foo nil) nil)
       (setf (find-class 'bar nil) nil)
       ,body-value))

Macroexpansion:
(let (#:g139) (defclass foo nil ((a :initform 3))) (defmethod get-val ((object foo) &rest slot/s) (slot-value object (car slot/s))) (defmethod (setf get-val) (new-value (object foo) &rest slot/s) (setf (slot-value object (car slot/s)) new-value)) (defstruct bar a) (setq #:g139 (let ((str (alexandria:copy-array "abcde")) (vec (alexandria:copy-array #(a b c d e))) (arr (alexandria:copy-array #2A((1 2 3) (4 5 6)))) (list (copy-list (quote (a b c d e)))) (ht (eval (read-from-string "{'a 'b 'c 'd}"))) (ht-eq (eval (read-from-string "{eq \"a\" 1
                                                    \"b\" 2}"))) (ht-equalp (eval (read-from-string "{equalp '(1 2 3) \"a\"
                                                               '(4 5 6) \"b\"}"))) (assoc-list (copy-tree (quote ((a . 1) (b . 2))))) (plist (copy-list (quote (:a 4 :c 5)))) (clos-object (make-instance (quote foo))) (struct (make-bar :a 3))) (declare (ignorable str vec arr list ht ht-eq ht-equalp assoc-list plist clos-object struct)) (setp 7 [struct (quote a])))) (setf (find-class (quote foo) nil) nil) (setf (find-class (quote bar) nil) nil) #:g139)
You are a Common Lisp macro expert. Given this code pattern:
(define-element-maker :symbol "symbol" '(:id))

Write a macro that addresses: Macro call that should be transformed by define-element-maker

Macro definition:
(defmacro define-element-maker (element name required-attributes)
  `(progn
     (defmethod assert-required-attributes ((element (eql ,element)) attributes)
       (declare (ignore element))
       (unless (evenp (length attributes))
         (warn "attribute list may be missing data: ~A" attributes))
       (let ((missing (set-difference ,required-attributes attributes)))
	 (when missing
	   (error 'missing-attributes :message (format nil "~A missing attributes: ~{~A~^ ~}" ,element missing)))))
     (defmethod make-svg-element ((element (eql ,element)) attributes)
       (when *check-required-attributes*
         (assert-required-attributes element attributes))
       (make-instance 'svg-element :name ,name :attributes attributes))))

Macroexpansion:
(progn (defmethod assert-required-attributes ((element (eql :symbol)) attributes) (declare (ignore element)) (unless (evenp (length attributes)) (warn "attribute list may be missing data: ~A" attributes)) (let ((missing (set-difference (quote (:id)) attributes))) (when missing (error (quote missing-attributes) :message (format nil "~A missing attributes: ~{~A~^ ~}" :symbol missing))))) (defmethod make-svg-element ((element (eql :symbol)) attributes) (when *check-required-attributes* (assert-required-attributes element attributes)) (make-instance (quote svg-element) :name "symbol" :attributes attributes)))
You are a Common Lisp macro expert. Given this code pattern:
(*> #'any #'eof)

Write a macro that addresses: Macro call that should be transformed by *>

Macro definition:
(defmacro *> (parser &rest parsers)
  "Combination of parsers yielding the result of the rightmost one."
  (let ((offset (gensym "*>-OFFSET")))
    `(lambda (,offset)
       ,(reduce (lambda (i p)
                  (let ((res  (gensym "*>-RES"))
                        (next (gensym "*>-NEXT")))
                    `(multiple-value-bind (,res ,next) ,i
                       (if (ok? ,res)
                           (funcall ,p ,next)
                           (fail ,next)))))
                parsers
                :initial-value `(funcall ,parser ,offset)))))

Macroexpansion:
(lambda (#:*>-offset161) (multiple-value-bind (#:*>-res162 #:*>-next163) (funcall (function any) #:*>-offset161) (if (ok? #:*>-res162) (funcall (function eof) #:*>-next163) (fail #:*>-next163))))
You are a Common Lisp macro expert. Given this code pattern:
(when head (if (eql (first head) t) (cons 'progn (cdr head)) `(if ,(first head) ,(when (cdr head) (cons 'progn (cdr head))) ,(when (cdr clauses) `(cond ,@(cdr clauses))))))

Write a macro that addresses: Macro call that should be transformed by when

Macro definition:
(defmacro when (test &body forms)
  `(if ,test
	   ,(cl:if (cadr forms)
			   `(progn ,@forms)
			   (car forms))))

Macroexpansion:
(if head (if (eql (first head) t) (cons (quote progn) (cdr head)) (sb-int:quasiquote (if #S(sb-impl::comma :expr (first head) :kind 0) #S(sb-impl::comma :expr (when (cdr head) (cons (quote progn) (cdr head))) :kind 0) #S(sb-impl::comma :expr (when (cdr clauses) (sb-int:quasiquote (cond #S(sb-impl::comma :expr (cdr clauses) :kind 2)))) :kind 0)))))
Define a macro that eliminates this repetitive pattern:
(defiter nil
    nil)

Issue: Macro call that should be transformed by DEFITER

Macro definition:
(defmacro DEFITER ...)

Macroexpansion:
(defun nil () (make-instance 'iterator :coro (lambda-coro)))
Generate a defmacro form that transforms code like this:
(c-assert (typep fm-parent 'family))

Pattern to recognize: Macro call that should be transformed by c-assert

Macro definition:
(defmacro c-assert (assertion &optional places fmt$ &rest fmt-args)
  (declare (ignorable assertion places fmt$ fmt-args))
   #+(or)`(progn) 
  `(unless *stop*
     (unless ,assertion
       ,(if fmt$
            `(c-break ,fmt$ ,@fmt-args)
          `(c-break "failed assertion: ~a" ',assertion)))))

Macroexpansion:
(unless *stop* (unless (typep fm-parent (quote family)) (c-break "failed assertion: ~a" (quote (typep fm-parent (quote family))))))
Define a macro that eliminates this repetitive pattern:
(define-error no-valid-function () (name types form) "There is no applicable method for the glsl function '~s' when called with ~a ~@[Form: ~a~]" name (if types (format nil "argument types:~%~s" (mapcar #'type->type-spec types)) "no arguments.") form)

Issue: Macro call that should be transformed by define-error

Macro definition:
(defmacro define-error (name (&key (error-type 'varjo-error) (prefix "Varjo"))
                            (&rest args) error-string &body body)
  `(defcondition ,name (:error-type ,error-type :prefix ,prefix) ,args
       ,error-string ,@body))

Macroexpansion:
(defcondition no-valid-function (:error-type varjo-error :prefix "Varjo") (name types form) "There is no applicable method for the glsl function '~s' when called with ~a ~@[Form: ~a~]" name (if types (format nil "argument types:~%~s" (mapcar (function type->type-spec) types)) "no arguments.") form)
Define a macro that eliminates this repetitive pattern:
(when-let (name (messenger-name self)) (format stream "~a" name))

Issue: Macro call that should be transformed by when-let

Macro definition:
(defmacro when-let (binding &body body)
  (destructuring-bind (var val) binding
    `(let ((,var ,val))
       (when ,var
	 ,@body))))

Macroexpansion:
(let ((name (messenger-name self))) (when name (format stream "~a" name)))
Define a macro that eliminates this repetitive pattern:
(collect-product nil)

Issue: Macro call that should be transformed by COLLECT-PRODUCT

Macro definition:
(defmacro COLLECT-PRODUCT ...)

Macroexpansion:
(common-lisp:let* ((#:generator-125 (generator nil))
                   #:numbers-121
                   (#:mul-122 1))
  (declare (type generator #:generator-125)
           (type number #:mul-122))
  (tagbody
   #:ll-126
    (setq #:numbers-121 (next-in #:generator-125 (go end)))
    (setq #:mul-122 (* #:mul-122 #:numbers-121))
    (go #:ll-126)
   end)
  #:mul-122)
Create a Common Lisp macro for the following transformation. Before code:
(resolving
  nil
  :key
  nil)

What needs to change: Macro call that should be transformed by RESOLVING

Macro definition:
(defmacro RESOLVING ...)

Macroexpansion:
(resolve
  nil
  :key
  nil)
Create a Common Lisp macro for the following transformation. Before code:
(continue-whopper nil)

What needs to change: Macro call that should be transformed by CONTINUE-WHOPPER

Macro definition:
(defmacro CONTINUE-WHOPPER ...)

Macroexpansion:
(call-next-method-fn self class-env inst-env mcs%caller mcs%next-methods
                     (list nil))
Define a macro that eliminates this repetitive pattern:
(define-condition/a dbi-programming-error (dbi-database-error) () (:documentation "Exception raised for programming errors, e.g. table not found or already exists, syntax error in SQL statement, wrong number of parameters specified, etc."))

Issue: Macro call that should be transformed by define-condition/a

Macro definition:
(defmacro define-condition/a (name parent-types slots &body options)
  `(progn
     (define-condition ,name ,parent-types ,slots ,@options)
     (deftype ,(intern (format nil "<~A>" (symbol-name name))) () ',name)
     (setf (find-class ',(intern (format nil "<~A>" (symbol-name name))))
           (find-class ',name))))

Macroexpansion:
(progn (define-condition dbi-programming-error (dbi-database-error) nil (:documentation "Exception raised for programming errors, e.g. table not found or already exists, syntax error in SQL statement, wrong number of parameters specified, etc.")) (deftype <dbi-programming-error> nil (quote dbi-programming-error)) (setf (find-class (quote <dbi-programming-error>)) (find-class (quote dbi-programming-error))))
Define a macro that eliminates this repetitive pattern:
(when item `(make-node ,item))

Issue: Macro call that should be transformed by when

Macro definition:
(defmacro when (test &body forms)
  `(if ,test
	   ,(cl:if (cadr forms)
			   `(progn ,@forms)
			   (car forms))))

Macroexpansion:
(if item (sb-int:quasiquote (make-node #S(sb-impl::comma :expr item :kind 0))))
Create a Common Lisp macro for the following transformation. Before code:
(define-accumulation-binding appending (var form &aux (head (cons NIL NIL)) (tail head)) (declare (type list var) (type cons head tail)) (let ((result (gensym "RESULT")) (new-tail (gensym "NEW-TAIL"))) `(let ((,result ,form)) (when ,result (multiple-value-bind (,head ,new-tail) (copy-list* ,result) (setf (cdr ,tail) ,head ,tail ,new-tail)) (setf ,var (cdr ,head))))))

What needs to change: Macro call that should be transformed by define-accumulation-binding

Macro definition:
(defmacro define-accumulation-binding (name (var &rest args) &body body)
  `(define-form-binding ,name (,var ,@args)
     ,@(form-fiddle:lambda-declarations `(lambda () ,@body))
     (values
      (progn ,@(form-fiddle:lambda-forms `(lambda () ,@body)))
      (delist var))))

Macroexpansion:
(define-form-binding appending (var form &aux (head (cons nil nil)) (tail head)) (declare (type list var) (type cons head tail)) (values (progn (let ((result (gensym "RESULT")) (new-tail (gensym "NEW-TAIL"))) (sb-int:quasiquote (let ((#S(sb-impl::comma :expr result :kind 0) #S(sb-impl::comma :expr form :kind 0))) (when #S(sb-impl::comma :expr result :kind 0) (multiple-value-bind (#S(sb-impl::comma :expr head :kind 0) #S(sb-impl::comma :expr new-tail :kind 0)) (copy-list* #S(sb-impl::comma :expr result :kind 0)) (setf (cdr #S(sb-impl::comma :expr tail :kind 0)) #S(sb-impl::comma :expr head :kind 0) #S(sb-impl::comma :expr tail :kind 0) #S(sb-impl::comma :expr new-tail :kind 0))) (setf #S(sb-impl::comma :expr var :kind 0) (cdr #S(sb-impl::comma :expr head :kind 0)))))))) (delist var)))
Define a macro that eliminates this repetitive pattern:
(when (find (first x) (list 'stropt)) (let ((s (short x)) (l (long x))) (if s (push s opts-short)) (if l (push l opts-long))))

Issue: Macro call that should be transformed by when

Macro definition:
(defmacro when (test &body forms)
  `(if ,test
	   ,(cl:if (cadr forms)
			   `(progn ,@forms)
			   (car forms))))

Macroexpansion:
(if (find (first x) (list (quote stropt))) (let ((s (short x)) (l (long x))) (if s (push s opts-short)) (if l (push l opts-long))))
Define a macro that eliminates this repetitive pattern:
(-> :g (v) (put v))

Issue: Macro call that should be transformed by ->

Macro definition:
(defmacro -> (invariant &body args)
  "See flow:atomically"
  `(atomically ,invariant ,@args))

Macroexpansion:
(atomically :g (v) (put v))
Write a Common Lisp macro to handle this code pattern:
(implies (slot-boundp object (slot-definition-name slot)) (typep (slot-value object (slot-definition-name slot)) (slot-definition-type slot)))

Problem: Macro call that should be transformed by implies

Macro definition:
(defmacro implies (condition consequent)
  "A boolean operator that evaluates to the value of CONSEQUENT if CONDITION is
   true, and otherwise evaluates to T. This isn't particularly specific to Quid
   Pro Quo, but it is a useful logical operator for contracts."
  `(if ,condition ,consequent t))

Macroexpansion:
(if (slot-boundp object (slot-definition-name slot)) (typep (slot-value object (slot-definition-name slot)) (slot-definition-type slot)) t)