   (with-errors-being-passed-on transport msg
     (let [occurrences (find-symbol msg)]
       (doseq [occurrence occurrences
-              :let [response (pr-str (apply create-result-alist occurrence))]]
+              :let [response (serialize-response msg (apply create-result-alist occurrence))]]
         (transport/send transport
                         (response-for msg :occurrence response)))
       (transport/send transport (response-for msg :count (count occurrences)

  `(with-errors-being-passed-on ~transport ~msg
     (transport/send ~transport (response-for ~msg ~(apply hash-map kv)))))

(defn resolve-missing-reply [{:keys [transport] :as msg}]
  (reply transport msg :candidates (resolve-missing msg) :status :done))



(defn- stubs-for-interface-reply [{:keys [transport] :as msg}]
  (reply transport msg :status :done
         :functions (serialize-response msg (stubs-for-interface msg))))

(defn- extract-definition-reply [{:keys [transport] :as msg}]
  (reply transport msg :status :done :definition (pr-str (extract-definition msg))))
