         (cond
          lb (:name lb)
          
-         ;;todo - resolve ns aliases when we have them
          (namespace sym)
-         (symbol (str (namespace sym) "." (munge (name sym))))
+         (symbol (str (resolve-ns-alias env (namespace sym)) "." (munge (name sym))))
 
          (.contains s ".")
          (munge (let [idx (.indexOf s ".")

        base (io/resource "goog/base.js")]
    (assert base "Can't find goog/base.js in classpath")
    (.put jse javax.script.ScriptEngine/FILENAME "goog/base.js")
    (with-open [r (io/reader base)]
      (.eval jse r))
    (.eval jse bootjs)

goog.provide('cljs.core');
goog.provide('cljs.user');
cljs.core.truth_ = function(x){return x != null && x !== false;}
cljs.core.fnOf_ = function(f){return (f instanceof Function?f:f.cljs$core$Fn$invoke);}
cljs.core.original_goog_require = goog.require;
goog.require = function(rule){Packages.clojure.lang.RT[\"var\"](\"cljs.compiler\",\"require\").invoke(goog.global.cljs_javascript_engine, rule);}
")

(defn resolve-ns-alias [env name]
  (let [sym (symbol name)]
    (get (:requires (:ns env)) sym sym)))

(defn resolve-var [env sym]
  (let [s (str sym)
