                                      :undeclared-var warn-on-undeclared
                                      :undeclared-ns warn-on-undeclared
                                      :undeclared-ns-form warn-on-undeclared)
-               ana/*cljs-static-fns* static-fns]
+               ana/*cljs-static-fns* static-fns
+               *repl-opts* opts]
        ;; TODO: the follow should become dead code when the REPL is
        ;; sufficiently enhanced to understand :cache-analysis - David
        (let [env {:context :expr :locals {}}

    (display-error repl-env ret form (constantly nil) opts))
  ([repl-env ret form f opts]
    (f)
    (println (:value ret))
    (when-let [st (:stacktrace ret)]
      (if (and (true? (:source-map opts))
               (satisfies? IParseStacktrace repl-env))

(defn print-mapped-stacktrace
  "Given a vector representing the canonicalized JavaScript stacktrace
   print the ClojureScript stacktrace. See mapped-stacktrace."
  ([stacktrace] (print-mapped-stacktrace stacktrace *repl-opts*))
  ([stacktrace opts]
    (doseq [{:keys [function file line column]}
            (mapped-stacktrace stacktrace opts)]
      ((:print opts) "\t" (str function " (" file ":" line ":" column ")")))))

(comment
  (cljsc/build "samples/hello/src"
