     (if ky
       [:group
        "-- Docs for key " (color (pr-str k) :bold) " --" 
-       :break
        (print-key-doc parent-type k ky)
        :break]
       "")))

(defn assert-not-empty [root & key-list]
  (mapv (fn [k] [root :not-empty k]) key-list))

#_(required-keys 'FigOpts :hello :goodbye)

#_(defn doc-type? [x]
  (and (map? x)
       (= #{:content :example} (set (keys x)))
       (let [{:keys [example content]} x]
         (or (fn? example)
             (string? example)))))

(defn doc
  ([root type-doc kd]
   (cons [root :doc-type type-doc]
         (mapv (fn [[k d]] [root :doc-key k d]) kd)))
  ([root type-doc]
   (doc root type-doc [])))

#_(index-spec
 (doc 'FigOpts "This is a cool option"
      {
       :hello ":hello is needed to say hello"
       :good ":good is needed to say goodbye"
       :hey-there {:content "This is docs"
                   :example "This is an example"}})) 

;; Direct Implementation
;; this is still squirrely

      single-error)))

(defn print-errors-test [config]
  (mapv #(print-error (assoc % :orig-config config))
        (type-check 'RootMap config)))

(defn print-errors-test-first [config]
  (mapv #(print-error (assoc % :orig-config config))
        (take 1 (type-check 'RootMap config))))

