     [(misspelled-key parent-type bad-key value)
      (misplaced-key  root-type parent-type bad-key value)
      (misspelled-misplaced-key root-type parent-type bad-key value)])))
+
+
 
 #_(with-schema (index-spec (spec 'Root {:figwheel string?
                                       :forest integer?

   [clojure.core.match :refer [match]]
   [clojure.test :as t :refer [deftest is run-tests]]))

(def ^:dynamic *schema-rules* [])

(defmacro with-schema [rules & body] 
  `(binding [*schema-rules* ~rules] ~@body))

     (group-by (fn [x] [:parent (second x) (first (nth x 2))]) (filter #(#{:?- :-} (second %)) spc))
     (group-by (juxt second first) spc))))

(defn fetch-pred [pred-type parent-type]
  (when-let [res (first (map last (*schema-rules* [pred-type parent-type])))]
    [pred-type res parent-type]))
