 (ns active.clojure.record
-  (:require [active.clojure.lens :as lens]))
+  #?@
+  (:clj
+   [(:require
+     [active.clojure.lens :as lens]
+     [active.clojure.macro :refer [if-cljs]])]
+   :cljs
+   [(:require
+     [active.clojure.lens :as lens]
+    (:require-macros [active.clojure.macro :refer [if-cljs]])]))
 
 ;; Only needed in ClojureScript, does nothing in Clojure
 (defn check-type

(defrecord RecordMeta
    ;; unresolved store for record related symbols. May not leak outside this
    ;; namespace. Contains ns to allow post-macro qualification; see `record-meta` function.
    [predicate constructor ordered-accessors ns])


#?(:clj
(defmacro define-record-type

                    (str "[[" (ns-name *ns*) "/" name "]]"))
        ?docref (str "See " (reference ?constructor) ".")

        record-meta `(make-record-meta ~?predicate ~?constructor ~?constructor-args ~?field-triples)]

    (let [?field-names-set (set ?field-names)]
      (doseq [?constructor-arg ?constructor-args]
