Create a Common Lisp macro for the following transformation. Before code:
(define-class foo-type-infer () ((name "foo") (nickname street-name) (age 1) (height 2.0) (width 2 :type number) (lisper t) (nil-is-not-bool nil) (empty-list '()) (nonempty-list '(1 2 3)) (mark :foo) (binding :unbound) (sym 'sims) (fun #'list) (composite (error "Should not eval, type should not be inferred"))) (:automatic-types-p t))

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

Macro definition:
(defmacro define-class (name supers slots &rest options)
  "Convenience wrapper of `defclass'.

It automates a lot of boilerplate (like exporting all the accessors of a class)
plus adds some new features.



Slot options:

- The initform can be specified as the second value.

- `:accessor', `:reader' and `:writer' can be set to either a name, NIL or T.
  If NIL, the method is not generated.
  If T, the method is generated using the `:accessor-name-transformer' class option value.

- The `:export' option allows to control the slot-name export on a per-slot basis.



New class options (defaults are NIL unless specified):

- `:slot-definition-transformer' (default: `default-slot-definition-transformer').
  A function that takes a SLOT-DEFINITION and returns a new one.

- `:accessor-name-package': The package of the generated accessors.  See
  `:accessor-name-transformer'.  Some special values are accepted:
  - `:slot-name': The package of the slot-name.
  - `:default': The current package.

- `:accessor-name-transformer' (default `default-accessor-name-transformer').

  A function of (SLOT-NAME SLOT-DEFINITION) arguments that returns the accessor
  name (a symbol).  Other transformer: `dwim-accessor-name-transformer'.

- `:automatic-accessors-p': Whether to generate accessor names automatically for
  all slots.

  As a special case, the accessor is not generated if all following conditions are met:
  - `:accessor-name-package' is `:slot-name',
  - slot name package is different from current package,
  - if the `:accessor' slot option is not provided,


- `:initarg-name-transformer' (default: `default-initarg-name-transformer'.)

  A function of (SLOT-NAME SLOT-DEFINITION) arguments that returns the accessor
  name (a symbol.

- `:automatic-initargs-p' (default: T): Whether to generate accessor names
  automatically for all slots.

- `:predicate-name-transformer' (default: `default-predicate-name-transformer').

  A function of (SLOT-NAME SLOT-DEFINITION) arguments that returns the predicate
  name (a symbol).

- `:automatic-predicates-p' (default: T): Whether to generate a predicate
  for the class.

- `:type-inference' (default: `default-type-inference').

  Function that returns the type of a slot definition (with an initform).  It
  takes 3 arguments:

  - The initform.
  - The slot name.
  - The rest of the slot definition.

- `:automatic-types-p': Whether to generate the type automatically for all
  slots.  The type can still be specified manually with the `:type' slot option.

- Self-explanatory export options (all NIL by default):
  - `:export-class-name-p'
  - `:export-accessor-names-p'
  - `:export-slot-names-p'
  - `:export-predicate-name'"
  (build-defclass-like-expansion
   name supers slots options
   (lambda (processed-slots clean-options)
     `(defclass ,name ,supers
        ,processed-slots
        ,@clean-options))))

Macroexpansion:
(progn (defclass foo-type-infer nil ((name :initform "foo" :accessor name :initarg :name :type string) (nickname :initform street-name :accessor nickname :initarg :nickname) (age :initform 1 :accessor age :initarg :age :type integer) (height :initform 2.0 :accessor height :initarg :height :type number) (width :initform 2 :accessor width :initarg :width :type number) (lisper :initform t :accessor lisper :initarg :lisper :type boolean) (nil-is-not-bool :initform nil :accessor nil-is-not-bool :initarg :nil-is-not-bool) (empty-list :initform (quote nil) :accessor empty-list :initarg :empty-list :type list) (nonempty-list :initform (quote (1 2 3)) :accessor nonempty-list :initarg :nonempty-list :type list) (mark :initform :foo :accessor mark :initarg :mark :type keyword) (binding :accessor binding :initarg :binding) (sym :initform (quote sims) :accessor sym :initarg :sym :type symbol) (fun :initform (function list) :accessor fun :initarg :fun :type function) (composite :initform (error "Should not eval, type should not be inferred") :accessor composite :initarg :composite))) (unless (fboundp (quote foo-type-infer-p)) (define-generic foo-type-infer-p (object) #A((79) base-char . "Auto-generated predicate for whether OBJECT is an instance of `foo-type-infer'.") (declare (sb-ext:muffle-conditions style-warning)) (typep object (quote foo-type-infer)))) (setf (documentation (quote composite) (quote function)) #A((52) base-char . "Auto-generated accessor function for slot COMPOSITE.")) (ignore-errors (setf (documentation (fdefinition (quote composite)) (quote function)) #A((52) base-char . "Auto-generated accessor function for slot COMPOSITE."))) (ignore-errors (setf (documentation (fdefinition (quote (setf composite))) (quote function)) #A((52) base-char . "Auto-generated accessor function for slot COMPOSITE."))) (setf (documentation (quote fun) (quote function)) #A((46) base-char . "Auto-generated accessor function for slot FUN.")) (ignore-errors (setf (documentation (fdefinition (quote fun)) (quote function)) #A((46) base-char . "Auto-generated accessor function for slot FUN."))) (ignore-errors (setf (documentation (fdefinition (quote (setf fun))) (quote function)) #A((46) base-char . "Auto-generated accessor function for slot FUN."))) (setf (documentation (quote sym) (quote function)) #A((46) base-char . "Auto-generated accessor function for slot SYM.")) (ignore-errors (setf (documentation (fdefinition (quote sym)) (quote function)) #A((46) base-char . "Auto-generated accessor function for slot SYM."))) (ignore-errors (setf (documentation (fdefinition (quote (setf sym))) (quote function)) #A((46) base-char . "Auto-generated accessor function for slot SYM."))) (setf (documentation (quote binding) (quote function)) #A((50) base-char . "Auto-generated accessor function for slot BINDING.")) (ignore-errors (setf (documentation (fdefinition (quote binding)) (quote function)) #A((50) base-char . "Auto-generated accessor function for slot BINDING."))) (ignore-errors (setf (documentation (fdefinition (quote (setf binding))) (quote function)) #A((50) base-char . "Auto-generated accessor function for slot BINDING."))) (setf (documentation (quote mark) (quote function)) #A((47) base-char . "Auto-generated accessor function for slot MARK.")) (ignore-errors (setf (documentation (fdefinition (quote mark)) (quote function)) #A((47) base-char . "Auto-generated accessor function for slot MARK."))) (ignore-errors (setf (documentation (fdefinition (quote (setf mark))) (quote function)) #A((47) base-char . "Auto-generated accessor function for slot MARK."))) (setf (documentation (quote nonempty-list) (quote function)) #A((56) base-char . "Auto-generated accessor function for slot NONEMPTY-LIST.")) (ignore-errors (setf (documentation (fdefinition (quote nonempty-list)) (quote function)) #A((56) base-char . "Auto-generated accessor function for slot NONEMPTY-LIST."))) (ignore-errors (setf (documentation (fdefinition (quote (setf nonempty-list))) (quote function)) #A((56) base-char . "Auto-generated accessor function for slot NONEMPTY-LIST."))) (setf (documentation (quote empty-list) (quote function)) #A((53) base-char . "Auto-generated accessor function for slot EMPTY-LIST.")) (ignore-errors (setf (documentation (fdefinition (quote empty-list)) (quote function)) #A((53) base-char . "Auto-generated accessor function for slot EMPTY-LIST."))) (ignore-errors (setf (documentation (fdefinition (quote (setf empty-list))) (quote function)) #A((53) base-char . "Auto-generated accessor function for slot EMPTY-LIST."))) (setf (documentation (quote nil-is-not-bool) (quote function)) #A((58) base-char . "Auto-generated accessor function for slot NIL-IS-NOT-BOOL.")) (ignore-errors (setf (documentation (fdefinition (quote nil-is-not-bool)) (quote function)) #A((58) base-char . "Auto-generated accessor function for slot NIL-IS-NOT-BOOL."))) (ignore-errors (setf (documentation (fdefinition (quote (setf nil-is-not-bool))) (quote function)) #A((58) base-char . "Auto-generated accessor function for slot NIL-IS-NOT-BOOL."))) (setf (documentation (quote lisper) (quote function)) #A((49) base-char . "Auto-generated accessor function for slot LISPER.")) (ignore-errors (setf (documentation (fdefinition (quote lisper)) (quote function)) #A((49) base-char . "Auto-generated accessor function for slot LISPER."))) (ignore-errors (setf (documentation (fdefinition (quote (setf lisper))) (quote function)) #A((49) base-char . "Auto-generated accessor function for slot LISPER."))) (setf (documentation (quote width) (quote function)) #A((48) base-char . "Auto-generated accessor function for slot WIDTH.")) (ignore-errors (setf (documentation (fdefinition (quote width)) (quote function)) #A((48) base-char . "Auto-generated accessor function for slot WIDTH."))) (ignore-errors (setf (documentation (fdefinition (quote (setf width))) (quote function)) #A((48) base-char . "Auto-generated accessor function for slot WIDTH."))) (setf (documentation (quote height) (quote function)) #A((49) base-char . "Auto-generated accessor function for slot HEIGHT.")) (ignore-errors (setf (documentation (fdefinition (quote height)) (quote function)) #A((49) base-char . "Auto-generated accessor function for slot HEIGHT."))) (ignore-errors (setf (documentation (fdefinition (quote (setf height))) (quote function)) #A((49) base-char . "Auto-generated accessor function for slot HEIGHT."))) (setf (documentation (quote age) (quote function)) #A((46) base-char . "Auto-generated accessor function for slot AGE.")) (ignore-errors (setf (documentation (fdefinition (quote age)) (quote function)) #A((46) base-char . "Auto-generated accessor function for slot AGE."))) (ignore-errors (setf (documentation (fdefinition (quote (setf age))) (quote function)) #A((46) base-char . "Auto-generated accessor function for slot AGE."))) (setf (documentation (quote nickname) (quote function)) #A((51) base-char . "Auto-generated accessor function for slot NICKNAME.")) (ignore-errors (setf (documentation (fdefinition (quote nickname)) (quote function)) #A((51) base-char . "Auto-generated accessor function for slot NICKNAME."))) (ignore-errors (setf (documentation (fdefinition (quote (setf nickname))) (quote function)) #A((51) base-char . "Auto-generated accessor function for slot NICKNAME."))) (setf (documentation (quote name) (quote function)) #A((47) base-char . "Auto-generated accessor function for slot NAME.")) (ignore-errors (setf (documentation (fdefinition (quote name)) (quote function)) #A((47) base-char . "Auto-generated accessor function for slot NAME."))) (ignore-errors (setf (documentation (fdefinition (quote (setf name))) (quote function)) #A((47) base-char . "Auto-generated accessor function for slot NAME."))) (find-class (quote foo-type-infer) nil))