;; next/genesis/object-types/define-object.sx
;;
;; Meta-object that registers a new object-type. Bootstrap-level —
;; runtime registration of new object types (e.g. DefineSubscription
;; in the Step 9b smoke test) flows through this.

(DefineObject
  :name "DefineObject"
  :doc "Object-type registration. :name is the type tag (e.g.\n        \"PinSpec\"); :schema is an SX predicate over object\n        forms of that type."
  :schema (fn
    (obj)
    (and (string? (-> obj :name)) (not (nil? (-> obj :schema))))))
