                :gen (fn []
                       (->> (s/gen (s/keys :req-un ~ks))
                            (gen/fmap (fn [ks#] (apply ~constructor
-                                                   (vals ks#))))))))))
+                                                      (vals ks#))))))))))
 
 
 (defn define-constructor-spec-form

    [(:require
      [active.clojure.condition :as c]
      [clojure.spec.alpha :as s]
      [clojure.spec.gen.alpha :as gen])]
    :cljs
    [(:require
      [active.clojure.condition :as c]
      [cljs.spec.alpha :as s]
      [cljs.spec.gen.alpha :as gen])]))

(def pass (constantly true))

(defn throw-illegal-argument-exception
  [msg]
  (c/assertion-violation `throw-illegal-argument-exception "Illegal argument" msg)
  #_(throw
   #?(:clj  (IllegalArgumentException. msg)
      :cljs (js/Error. msg))))

;; Only needed in ClojureScript, does nothing in Clojure
(defn check-type

           :args (s/cat ~(keyword the-type-name) ~(ns-keyword the-type-name))
           :res ~boolean?))

(defmacro s-def
  [& args]
  `(if-cljs (cljs.spec.alpha/def ~@args)
            (clojure.spec.alpha/def ~@args)))

(defmacro s-fdef
  [& args]
  `(if-cljs (cljs.spec.alpha/fdef ~@args)
            (clojure.spec.alpha/fdef ~@args)))

(defmacro s-and
  [& args]
  `(if-cljs (cljs.spec.alpha/and ~@args)
            (clojure.spec.alpha/and ~@args)))

(defmacro s-cat
  [& args]
  `(if-cljs (cljs.spec.alpha/cat ~@args)
            (clojure.spec.alpha/cat ~@args)))

(defmacro s-spec
  [& args]
  `(if-cljs (cljs.spec.alpha/spec ~@args)
            (clojure.spec.alpha/spec ~@args)))

(defmacro s-keys
  [& args]
  `(if-cljs (cljs.spec.alpha/keys ~@args)
            (clojure.spec.alpha/keys ~@args)))

(defmacro s-gen
  [& args]
  `(if-cljs (cljs.spec.alpha/gen ~@args)
            (clojure.spec.alpha/gen ~@args)))

(defmacro s-fmap
  [& args]
  `(if-cljs (cljs.spec.gen.alpha/fmap ~@args)
            (clojure.spec.gen.alpha/fmap ~@args)))

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