(defn parse-var
[[_ var :as form] env]
(when-not (= 2 (count form))
(throw (ex-info (str "Wrong number of args to var, had: " (dec (count form)))
(merge {:form form}
(-source-info form env)))))
(if-let [var (resolve-sym var env)]
{:op :the-var
:env env
:form form
:var var}
(throw (ex-info (str "var not found: " var) {:var var}))))