anchor.diff:      (values (media-type-type type)
               (media-type-subtype type)
               (media-type-params type))))
  -
  -(defun media-type= (x y)
  -  (let ((x (parse-media-type x))
  -        (y (parse-media-type y)))
  -    (or (equalp x y)
  -        (and (media-subtypep x y)
  -             (media-subtypep y x)))))
  -
  -(define-compiler-macro media-type= (&whole call &environment env
  -                                           x y)
  -  (cond ((and (constantp x env)
  -              (constantp y env))
  -         `(load-time-value (media-type= ,x ,y)))
  -        ((constantp x env)
  -         `(media-type= (load-time-value (parse-media-type ,x)) ,y))
  -        ((constantp y env)
  -         `(media-type= ,x (load-time-value (parse-media-type ,y))))
  -        (t call)))
   
   (defun parse-media-type (type &key (allow-params t))
     (etypecase-of media-type-designator type
  
positive.code: (defun suffix-type (suffix)
    (assoc-value suffix-types suffix :test #'equal))
  
  (defgeneric media-subtypep (subtype type))
  
  (define-compiler-macro media-subtypep (&whole decline
                                                subtype type
                                                &environment env)
    (cond ((and (constantp subtype env)
                (constantp type env))
           `(load-time-value (media-subtypep ,subtype ,type)))
          ((constantp subtype env)
           `(media-subtypep (load-time-value (parse-media-type ,subtype))
                            ,type))
          ((constantp type env)
           `(media-subtypep ,subtype
                            (load-time-value (parse-media-type ,type))))
          (t decline)))
  
  (defun render-media-type (self stream)
    (format stream
            "~a/~a~@[;~:{~a=~a~^;~}~]"
  
negative.code:                  (equal subtype1 subtype2))
               (subsetp params2 params1 :test #'equalp)))))
  
  (define-compiler-macro media-subtypep (&whole decline
                                                subtype type
                                                &environment env)
    (cond ((and (constantp subtype env)
                (constantp type env))
           `(load-time-value (media-subtypep ,subtype ,type)))
          ((constantp subtype env)
           `(media-subtypep (load-time-value (parse-media-type ,subtype))
                            ,type))
          ((constantp type env)
           `(media-subtypep ,subtype
                            (load-time-value (parse-media-type ,type))))
          (t decline)))
  
  (defun media-type= (x y)
    (let ((x (parse-media-type x))
          (y (parse-media-type y)))
      (or (equalp x y)
          (and (media-subtypep x y)
               (media-subtypep y x)))))
  
  (define-compiler-macro media-type= (&whole call &environment env
                                             x y)
    (cond ((and (constantp x env)
                (constantp y env))
           `(load-time-value (media-type= ,x ,y)))
          ((constantp x env)
           `(media-type= (load-time-value (parse-media-type ,x)) ,y))
          ((constantp y env)
           `(media-type= ,x (load-time-value (parse-media-type ,y))))
          (t call)))
  
  (defun media-type-supers (type)
    (etypecase-of media-type-designator type
      (string (media-type-supers (parse-media-type type)))
      (symbol (media-type-supers (parse-media-type type)))
      (media-type
       (let ((supers '()))
         (multiple-value-bind (type subtype params)
             (media-type-values type)
           (push (parse-media-type (concat type "/*")) supers)
           (when-let (pos (position #\+ subtype))
             (let ((ext (subseq subtype (min (1+ pos) (length subtype)))))
               (string-case (string-downcase ext)
                 ("xml" (push application/xml supers))
                 ("json" (push application/json supers)))))
           (when params (loop for set in (sort (powerset params) #'< :key #'length)
                              if (< (length set) (length params))
                                do (push (make-media-type :type type
                                                          :subtype subtype
                                                          :params set)
                                         supers))))
         ;; Already in descending order of specificity.
         (delete-duplicates supers :test #'media-type=)))))
  