 (ns daiquiri.compiler
   (:require [daiquiri.normalize :as normalize]
             [daiquiri.util :refer :all]
-            [clojure.set :as set]
-            [cljs.analyzer :as ana]))
+            [clojure.set :as set]))
 
 (def warn-on-interpretation (atom false))
+
+(defn- requiring-resolve [sym]
+  (or (resolve sym)
+      (do (require (-> sym namespace symbol))
+          (resolve sym))))
 
 (defn maybe-warn-on-interpret
   ([env expr]

                    (-> e :fn :info :meta :rum/tag second))]
      (if rum-tag
        (normalize-tags rum-tag)
        (when-let [tags (ana/infer-tag env e)]
          (normalize-tags tags))))))

(declare to-js to-js-map)

     (binding [*out* *err*]
       (let [column (:column env)
             line (:line env)]
         (require 'cljs.analyzer)
         (println (str "WARNING: interpreting by default at " (requiring-resolve 'cljs.analyzer/*cljs-file*) ":" line ":" column))
         (prn expr)
         (when tag
           (println "Inferred tag was:" tag)))))))
