     (ana/-analyze-form form env)))
 
 (defn parse-type
-  [op [_ name fields pmasks :as form] {:keys [ns namespaces] :as env}]
+  [op [_ name fields pmasks :as form] {:keys [ns] :as env}]
   (let [fields-expr (mapv (fn [name]
                             {:env     env
                              :form    name


(def ^:dynamic *ns* 'cljs.user)

(def namespaces
  (atom '{cljs.user {:mappings       {}
                     :aliases        {}
                     :macro-mappings {}
                     :macro-aliases  {}
                     :ns             cljs.user}
          cljs.core {:mappings       {}
                     :aliases        {}
                     :macro-mappings {}
                     :macro-aliases  {}
                     :ns             cljs.core}}))

(defn empty-env
  "Returns an empty env map"
  []
  {:context    :statement
   :locals     {}
   :ns         *ns*
   :namespaces namespaces})

(defn desugar-host-expr [[op & expr :as form]]
  (if (symbol? op)

       :else form))
    form))

(defn maybe-macro [sym {:keys [ns]}]
  (let [var (if-let [sym-ns (namespace sym)]
              (if-let [full-ns (get-in (env/deref-env)
                                       [:namespaces ns :macro-aliases (symbol sym-ns)])]
                (ns-resolve full-ns (symbol (name sym)))
                (ns-resolve (symbol sym-ns) (symbol (name sym))))
              (get-in (env/deref-env) [:namespaces ns :mcacro-mappings sym]))]
    (when (:macro (meta var))
      var)))

(defn macroexpand-1 [form env]
  (env/ensure (global-env)
    (if (seq? form)
      (let [op (first form)]
        (if (specials op)
          form
          (let [clj-macro (maybe-macro op env)]
            (if (and clj-macro
                     (not (resolve-var op env))
                     (not (-> env :locals (get op))))
              (apply clj-macro form env (rest form)) ; (m &form &env & args)
              (desugar-host-expr form)))))
      form)))

(defn create-var
  [sym {:keys [ns]}]
