      {:*compiler*     state
       :*cljs-ns*      'cljs.user
       :*ns*           (create-ns ana/*cljs-ns*)
-      :*data-readers* tags/*cljs-data-readers*}
+      :*data-readers* tags/*cljs-data-readers*
+      :*load-fn*      (or (:load-fn opts) *load-fn*)
+      :*eval-fn*      (or (:eval-fn opts) *eval-fn*)}
      source name opts cb)))
 
 ;; -----------------------------------------------------------------------------

         (cb))))))

(defn analyze-deps
  "Given a lib, a namespace, deps, its dependencies, env, an analysis environment
   and opts, compiler options - analyze all of the dependencies. Required to
   correctly analyze usage of other namespaces."
  ([bound-vars ana-env lib deps cb]
   (analyze-deps bound-vars ana-env lib deps nil cb))
  ([bound-vars ana-env lib deps opts cb]

                               :source js-source}))))))))))

(defn eval-str
  "Evalute ClojureScript source given as a string. The parameters:

  state (atom)
    the compiler state

  source (string)
    the ClojureScript source

  name (symbol)
    optional, the name of the source

  opts (map)
    compilation options.

    :eval-fn    - eval function to invoke, see *eval-fn*
    :load-fn    - library resolution function, see *load-fn*
    :source-map - set to true to generate inline source map information

  cb (function)
    callback, will be invoked with result of evalution"
  ([state source cb]
   (eval-str state source nil cb))
  ([state source name cb]
