            (not (symbol? x)))
       (quoted? x)))
 
+(derive clojure.lang.IPersistentList ::form)
+(derive clojure.lang.Symbol ::form)
+
+(defmulti compile-html
+  "Render a Clojure data structure to a seq of HTML at compile-time when
+  possible, at runtime when not."
+  type)
+
 (defn- collapse-strs
   "Concatenate adjacent strings in a sequence."
   [coll]

    '()
    (reverse coll)))

(defn build-seq
  "Create code that will build an output seq from a list of literals and
  forms."
  [coll]
  (let [coll (collapse-strs coll)]
    (if (every? literal? coll)
      coll
     `((concat ~@(for [x coll]
                   (if (literal? x)
                     `(list ~x)
                      x)))))))

(defn wrap-list
  "Wrap a seq in an `list form if a bare list."
  [coll]
  (if (symbol? (first coll))
    coll
    `(list ~@coll)))

(derive clojure.lang.IPersistentList ::form)
(derive clojure.lang.Symbol ::form)

(defmulti compile-html
  "Render a Clojure data structure to a seq of HTML at compile-time when
  possible, at runtime when not."
  type)

(defn compile-tag
  "Attempt to pre-render a HTML tag."
  [tag-name content]
  (if (literal? tag-name)
    (render-tag tag-name content)
   `((render-tag ~tag-name ~content))))

(defn compile-attrs
  "Attempt to pre-render an attribute map."
  [attrs content]
  (if (map? attrs)
    (render-attrs attrs content)
    (if (not (literal? attrs))
     `((render-attrs ~attrs ~(wrap-list content)))
      content)))

(defn compile-content
  "Attempt to pre-render the contents of a tag."
  [content]
  (build-list
    (cons
      ">"
      (if (map? (first content))
        (mapcat compile-html (rest content))
        (if (literal? (first content))
          (mapcat compile-html content)
          (concat
            (for [x (take 2 content)]
              `(render-html ~x))
            (map compile-html (drop 2 content))))))))

(defmethod compile-html ::vector
  [[tag & content]]


(defmethod compile-html ::form
  [form]
  `((render-html ~form)))

(defmethod compile-html :default
  [x]
