              ns (if (= "clojure.core" ns) "cljs.core" ns)
              full-ns (resolve-ns-alias env ns)]
          (confirm-var-exists env full-ns (symbol (name sym)))
-         {:name (symbol (str full-ns "." (munge (name sym))))
-          :ns full-ns})
+         (merge
+          (get-in @namespaces [full-ns :defs sym])
+          {:name (symbol (str full-ns "." (munge (name sym))))
+           :ns full-ns}))
 
        (.contains s ".")
        (let [idx (.indexOf s ".")

           {:name (munge (symbol (str (:name lb) suffix)))}
           (do
             (confirm-var-exists env prefix (symbol suffix))
             {:name (munge sym) :ns prefix})))

       (get-in @namespaces [(-> env :ns :name) :uses sym])
       {:name (symbol (str (get-in @namespaces [(-> env :ns :name) :uses sym]) "." (munge (name sym))))
        :ns (-> env :ns :name)}

       :else
       (let [full-ns (if (core-name? env sym)
                       'cljs.core
                       (-> env :ns :name))]
         (confirm-var-exists env full-ns sym)
         {:name (munge (symbol (str full-ns "." (munge (name sym)))))
          :ns full-ns})))))

(defn resolve-var [env sym]
  (if (= (namespace sym) "js")


(defmethod parse 'def
  [op env form name]
  (let [pfn (fn
              ([_ sym] {:sym sym})
              ([_ sym init] {:sym sym :init init})
              ([_ sym doc init] {:sym sym :doc doc :init init}))
        args (apply pfn form)
        sym (:sym args)
        tag (-> sym meta :tag)]
    (assert (not (namespace sym)) "Can't def ns-qualified name")
    (let [env (let [ns-name (-> env :ns :name)]
                (if (or (and (not= ns-name 'cljs.core)
