                  :via [:fig-opt/builds :fig-opt/builds :fig-opt/build-config :fig-opt/build-config],
                  :in [0]})
 
+;; *** mark errors with a type
+
+
 (defn error-type [error]
   (cond
     (error ::unknown-key)      ::unknown-key

;; this will provide a more meaningful description of whats gone wrong
;; will delegete to a ns/key based error message if available

;; temporary copy from spec until public fns make it into api
;; *** TODO this needs to be refined to the default error
;; must keep in mind that the error is going to be displayed below
(defn message-default-str


(def type-lookup->str (some-fn symbol-type-table pr-str))

(defn resovlable-predicate? [x]
  (or (symbol-type-table x)
   (and
    (sequential? x)
    (= 1 (count x))
    (symbol-type-table (first x)))))

(defn pred-symbol->str [x]
  (if-let [res (resovlable-predicate? x)]
    res
    (type-lookup->str x)))

