(defn check-use-macros
([use-macros env]
(check-use-macros use-macros nil env))
([use-macros missing-uses env]
(let [cenv @env/*compiler*]
(doseq [[sym lib] use-macros]
(when (missing-use-macro? lib sym)
(throw
(error env
(error-message :undeclared-ns-form {:type "macro" :lib lib :sym sym})))))
(check-uses (missing-use-macros missing-uses env) env)
(inferred-use-macros missing-uses env))))