     specials))
 
 ;; pseudo-namespace since repl special forms don't have a namespace
-(defmethod parse-ns "specialrepl" [ns-]
+(defmethod parse-ns ["specialrepl" :library] [ns- api]
   (let [forms (apply concat (read-ns-forms "cljs.repl" :compiler))
         docs (first (keep parse-repl-special-docs forms))
         specials (binding [*cur-ns* ns-

        extras (map make ["catch" "finally"])]
    (concat parsed extras)))

(defn parse-all
  []
  (let [syntax-parsed (parse-ns "syntax")
        lib-parsed (binding [*cur-api* "library"]
                     (->> cljs-lib-namespaces
                          (mapcat parse-ns)
                          doall
                          add-catch-finally))
        compiler-parsed (binding [*cur-api* "compiler"]
                          (->> cljs-compiler-namespaces
                               (mapcat parse-ns)
                               doall))]
    {:syntax syntax-parsed
     :library lib-parsed
     :compiler compiler-parsed}))


;;------------------------------------------------------------

(defmulti parse-ns
  (fn [ns- api]
    (if (= :custom (get-in namespaces [api ns-]))
      [ns- api]
      [:default api])))

(defmethod parse-ns ["cljs.core" :library] [ns- api]
  ;; NOTE: Concatenation order is important here
  ;; so previously defined macros/functions are overwritten
  ;; by subsequent ones.
