   (let [{:keys [ky] :as p} (docs-for parent-type k)]
     (if ky
       [:group
-       "Doc for key " (color (pr-str k) :bold) 
+       "-- Docs for key " (color (pr-str k) :bold) " --" 
        :break
-       [:nest 2 (color ky
-                       :underline)]
+       (color ky
+                       :underline)
        :break]
       "")))
 


(defn find-keyword-predicate [parent-type]
  (when-let [[pred-id _ [pt _ kt]] (first (*schema-rules* [:parent :?- parent-type]))]
    (when-let [pred-func (last (first (*schema-rules* [:k= pred-id])))]
      [pred-func kt])))

;; this is what implements or

           (list?? x))
       (empty? (rest x))))


(defn complex-value? [v]
  (or (list?? v) (map?? v) (fn? v) (-> v meta :ref)))

(def simple-value? (complement complex-value?))

(defn prep-key [k]
  (if (fn? k)
    (keyword (str "pred-key_" (hash k)))
    k))

(defn decompose [type-gen-fn node' s']
  (letfn [(handle-key-type [orig-key predicate-key-name node t]
            (if (fn? orig-key)
              [[predicate-key-name :?- [node :> t]]
               [predicate-key-name := orig-key]]
              [[orig-key :- [node :> t]]]))
          (decomp [node s]
            (if (nil? s)
              nil
              (let [[[k' v] & r] s
