 ;;   the terms of this license.
 ;;   You must not remove this notice, or any other, from this software.
 
-(ns clojure.tools.analyzer.passes.js.infer-tag)
+(ns clojure.tools.analyzer.passes.js.infer-tag
+  (:require [clojure.tools.analyzer.env :as env]
+            [clojure.tools.analyzer.utils :refer [arglist-for-arity]]))
 
 (defmulti -infer-tag :op)
 (defmethod -infer-tag :default [ast] ast)

(defmethod -infer-tag :loop
  [{:keys [body] :as ast}]
  (merge ast (select-keys body [:return-tag :arglists :ignore-tag :tag])))

(defn =-arglists? [a1 a2]
  (let [tag (fn [x] (-> x meta :tag))]

     ast)))

(defn infer-tag
  [{:keys [tag] :as ast}]
  (merge (-infer-tag ast)
         (when tag
           {:tag tag})))
