                  (or (map? requires)
                      (set? requires)) (contains? requires parent)
                  (vector? requires) (some #{(munge (name parent))} requires))))]
-     (util/topo-sort ns
+     (topo-sort ns
        (fn [ns']
          (set (map first (filter #(parent? ns' %) ns-map))))))))
 

     ([ns ext]
      (str (string/replace (munge-path ns) \. \/) "." (name ext)))))

(declare message namespaces)

(defn ast? [x]

;; `default-namespaces` when accessed outside the scope of a
;; compilation/analysis call
(def namespaces
  #?(:clj
     (reify clojure.lang.IDeref
       (deref [_]
         (if-not (nil? env/*compiler*)
           (::namespaces @env/*compiler*)
           default-namespaces)))
     :cljs
     (reify IDeref
       (-deref [_]
         (if-not (nil? env/*compiler*)
           (::namespaces @env/*compiler*)
           default-namespaces)))))

(defn get-namespace [key]
  (get-in @env/*compiler* [::namespaces key]))
