              check-uses-and-load-macros)
 
            :else
-           (check-uses-and-load-macros))))
-     (cb ast))))
+           (check-uses-and-load-macros {:value nil}))))
+     (cb {:value ast}))))
 
 (defn analyze* [bound-vars source name opts cb]
   (let [rdr        (rt/indexing-push-back-reader source 1 name)

   (if (= :ns op)
     (let [{:keys [deps uses requires require-macros use-macros reload reloads]} ast
           env (:*compiler* bound-vars)]
       (letfn [(check-uses-and-load-macros []
                 (when (and (:*analyze-deps* bound-vars) (seq uses))
                   (when (:verbose opts)
                     (debug-prn "Checking uses"))
                   (ana/check-uses uses env))
                 (if (:*load-macros* bound-vars)
                   (do
                     (when (:verbose opts)
                       (debug-prn "Loading :use-macros"))
                     (load-macros bound-vars :use-macros use-macros reload reloads opts
                       (fn []
                         (when (:verbose opts)
                           (debug-prn "Loading :require-macros"))
                         (load-macros bound-vars :require-macros require-macros reloads reloads opts
                           (fn []
                             (when (seq use-macros)
                               (when (:verbose opts)
                                 (debug-prn "Checking :use-macros"))
                               (ana/check-use-macros use-macros env))
                             (cb ast))))))
                   (cb ast)))]
         (cond
           (and load (seq deps))
           (load-deps bound-vars ana-env (:name ast) deps (dissoc opts :macros-ns)

                   ast  (ana/analyze aenv form)]
               (if (= :ns (:op ast))
                 (ns-side-effects bound-vars aenv ast opts
                   (fn [res]
                     (analyze-loop)))
                 (recur)))
             (cb))))))))

